:root {
  color-scheme: light;
  --word-blue: #185abd;
  --word-blue-2: #2b78d4;
  --ink: #172033;
  --muted: #5d697c;
  --line: #d9e2ef;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --green: #0f7b62;
  --gold: #b36b00;
  --shadow: 0 24px 64px rgba(24, 44, 84, 0.16);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  padding: 0 clamp(20px, 5vw, 72px);
  color: #ffffff;
  background: rgba(13, 31, 62, 0.36);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-solid,
.docs-header {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(24, 90, 189, 0.14);
  box-shadow: 0 10px 30px rgba(24, 44, 84, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 700;
  letter-spacing: 0;
}

.brand img {
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  color: inherit;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.is-solid .site-nav a:hover,
.docs-header .site-nav a:hover {
  background: #edf4ff;
}

.nav-cta {
  margin-left: 6px;
  color: #ffffff !important;
  background: var(--word-blue);
  box-shadow: 0 8px 20px rgba(24, 90, 189, 0.24);
}

.nav-cta:hover {
  background: #0f4aa2 !important;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 84vh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 128px clamp(20px, 6vw, 88px) 54px;
  color: #ffffff;
  background: #10203c;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("/assets/word-editor-workspace.png");
  background-size: cover;
  background-position: center top;
  transform: scale(1.01);
  filter: saturate(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 18, 42, 0.88) 0%, rgba(10, 31, 64, 0.70) 44%, rgba(10, 30, 56, 0.24) 100%),
    linear-gradient(0deg, rgba(6, 16, 31, 0.90) 0%, rgba(6, 16, 31, 0) 36%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a8ee8;
}

.hero .eyebrow {
  color: #bcd8ff;
}

.hero h1 {
  margin: 0;
  font-size: clamp(56px, 9vw, 118px);
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-lede {
  width: min(680px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.button-primary {
  color: #ffffff;
  background: var(--word-blue);
}

.button-primary:hover {
  background: #0f4aa2;
}

.button-secondary {
  color: #12233f;
  background: rgba(255, 255, 255, 0.92);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(720px, 100%);
  margin: 42px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-stats div {
  padding: 16px;
  background: rgba(8, 23, 45, 0.36);
}

.hero-stats dt {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bcd8ff;
}

.hero-stats dd {
  margin: 0;
  font-weight: 700;
}

.section {
  padding: clamp(64px, 8vw, 112px) clamp(20px, 6vw, 88px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 34px;
}

.section h2,
.docs-content h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section h3,
.docs-content h3 {
  margin: 0 0 10px;
  line-height: 1.2;
}

.section p,
.docs-content p,
.docs-content li {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(24, 44, 84, 0.08);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  border-radius: 7px;
  color: #ffffff;
  font-weight: 800;
}

.feature-icon-blue {
  background: var(--word-blue);
}

.feature-icon-green {
  background: var(--green);
}

.feature-icon-gold {
  background: var(--gold);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.72fr);
  gap: 44px;
  align-items: center;
  background: var(--surface-soft);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}

.text-link {
  color: var(--word-blue);
  font-weight: 800;
}

.text-link::after {
  content: " ->";
}

.code-panel {
  overflow: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 1px solid #233452;
  border-radius: 8px;
  color: #dceaff;
  background: #14213a;
  box-shadow: var(--shadow);
  line-height: 1.6;
  font-size: 13px;
}

.pipeline-section {
  background: #ffffff;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline li {
  min-height: 250px;
  padding: 24px;
  border-top: 4px solid var(--word-blue);
  background: #f7f9fd;
}

.pipeline span {
  display: block;
  margin-bottom: 28px;
  color: var(--word-blue);
  font-weight: 800;
}

.docs-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.78fr);
  gap: 34px;
  align-items: start;
  color: #ffffff;
  background: #14315f;
}

.docs-band .section-kicker,
.docs-band p {
  color: #bfd8ff;
}

.docs-links {
  display: grid;
  gap: 12px;
}

.docs-links a,
.doc-callouts a {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.docs-links span,
.doc-callouts span {
  color: #c7d8ef;
  font-size: 14px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 34px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.site-footer p {
  margin: 10px 0 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  color: var(--word-blue);
  font-weight: 700;
}

.docs-body {
  background: #f6f8fc;
}

.docs-shell {
  min-width: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 104px clamp(20px, 4vw, 52px) 72px;
}

.docs-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.docs-sidebar a {
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.docs-sidebar a:hover,
.docs-sidebar a.is-active {
  color: var(--word-blue);
  background: #edf4ff;
}

.docs-content {
  min-width: 0;
  overflow: visible;
  display: grid;
  gap: 0;
  padding: 0 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.docs-content > section {
  min-width: 0;
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.docs-content > section:last-child {
  border-bottom: 0;
}

.docs-hero {
  margin: 0 -34px;
  padding: 42px 34px !important;
  border-radius: 8px 8px 0 0;
  color: #ffffff;
  background:
    linear-gradient(110deg, rgba(20, 49, 95, 0.94), rgba(24, 90, 189, 0.88)),
    url("/assets/word-editor-workspace.png") center top / cover;
}

.docs-hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
  letter-spacing: 0;
}

.docs-hero p {
  max-width: 820px;
  color: #e0edff;
  font-size: 18px;
}

.doc-callouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 14px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #2b3b56;
  background: #f2f6fc;
}

td code,
p code,
li code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #123d82;
  background: #edf4ff;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.api-list {
  display: grid;
  gap: 10px;
}

.api-list div {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.api-list span {
  color: var(--muted);
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.command-grid div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.check-list {
  padding-left: 20px;
}

.check-list li + li {
  margin-top: 8px;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-block;
    color: inherit;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

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

  .nav-cta {
    justify-content: center;
    margin-left: 0;
  }

  .section-heading,
  .split-section,
  .docs-band {
    grid-template-columns: 1fr;
  }

  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid,
  .pipeline,
  .doc-callouts,
  .command-grid {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .docs-sidebar a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: 62px;
    padding: 0 16px;
  }

  .hero {
    min-height: 88vh;
    padding: 110px 18px 36px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .section,
  .docs-content > section {
    padding: 28px 18px;
  }

  .docs-content {
    padding: 0 18px;
  }

  .docs-hero {
    margin: 0 -18px;
    padding: 32px 18px !important;
  }

  .docs-hero p {
    max-width: 300px;
    font-size: 15px;
    word-break: break-word;
  }

  .docs-shell {
    padding: 86px 14px 48px;
  }

  .api-list div {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}
