/* ============================================
   Seek-Writer Documentation — Styles
   Matching the landing page warm-paper theme
   ============================================ */

@font-face {
  font-family: "Bradford LL";
  font-style: normal;
  font-weight: 450;
  font-display: swap;
  src:
    url("https://microsoft.ai/wp-content/themes/wp-base-theme/dist/assets/fonts/BradfordLLWeb-Regular.woff2") format("woff2"),
    url("https://microsoft.ai/wp-content/themes/wp-base-theme/dist/assets/fonts/BradfordLLWeb-Regular.woff") format("woff");
}

:root {
  --ink-900: #1b1916;
  --ink-700: #3a332c;
  --ink-500: #5e564c;
  --ink-400: #7a7168;
  --ink-300: #9e968d;
  --paper-100: #fdfaf4;
  --paper-200: #f7f1e6;
  --paper-300: #efe3d3;
  --sea-500: #4da8b6;
  --sea-600: #2f7b86;
  --sun-500: #e5a46f;
  --sun-400: #f0c29a;
  --moss-500: #8d9a7b;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.55);
  --shadow-soft: 0 18px 40px rgba(20, 18, 14, 0.12);
  --shadow-card: 0 4px 20px rgba(20, 18, 14, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-display: "Fraunces", "Noto Serif SC", "Songti SC", serif;
  --font-bradford: "Bradford LL", "Fraunces", "Noto Serif SC", "Songti SC", serif;
  --font-body: "Space Grotesk", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --sidebar-w: 260px;
  --header-h: 72px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ====== Body ====== */
.docs-body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper-100);
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ====== Background orbs ====== */
.docs-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
  background:
    radial-gradient(60% 60% at 10% 20%, rgba(240, 194, 154, 0.3), transparent 70%),
    radial-gradient(70% 70% at 90% 10%, rgba(77, 168, 182, 0.22), transparent 70%),
    radial-gradient(80% 80% at 20% 80%, rgba(141, 154, 123, 0.18), transparent 70%);
}

.docs-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
  mix-blend-mode: screen;
  opacity: 0.65;
}

.docs-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.4;
  transform: translateZ(0);
  contain: strict;
}

.docs-orb--one {
  width: 380px; height: 380px;
  top: -60px; left: -60px;
  background: rgba(240, 194, 154, 0.7);
}

.docs-orb--two {
  width: 420px; height: 420px;
  top: -100px; right: -100px;
  background: rgba(77, 168, 182, 0.55);
}

.docs-orb--three {
  width: 460px; height: 460px;
  bottom: -100px; left: 20%;
  background: rgba(141, 154, 123, 0.35);
}

/* ====== Header ====== */
.docs-header-wrap {
  position: fixed;
  top: 16px;
  left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
}

.docs-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.docs-brand__mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(20, 18, 14, 0.06);
  overflow: hidden;
}

.docs-brand__mark img {
  width: 32px; height: 32px;
  object-fit: contain;
}

.docs-brand__text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.docs-brand__name {
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.docs-brand__tag {
  font-size: 0.82rem;
  color: var(--ink-400);
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(77, 168, 182, 0.1);
  border: 1px solid rgba(77, 168, 182, 0.2);
}

.docs-header__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.docs-lang {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  padding: 3px;
  gap: 3px;
}

.docs-lang__btn {
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-size: 0.82rem;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.docs-lang__btn.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink-900);
  box-shadow: 0 4px 12px rgba(20, 18, 14, 0.1);
}

.docs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: var(--font-body);
}

.docs-btn--primary {
  background: linear-gradient(135deg, var(--sea-500), #6fd6c6);
  color: #fff;
  box-shadow: 0 8px 24px rgba(77, 168, 182, 0.3);
}

.docs-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(77, 168, 182, 0.35);
}

.docs-btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  color: var(--ink-700);
}

.docs-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.docs-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.docs-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-700);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* ====== Layout ====== */
.docs-layout {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: calc(var(--header-h) + 32px);
  min-height: 100vh;
}

/* ====== Sidebar ====== */
.docs-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  padding: 24px 16px 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-300) transparent;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--paper-300);
  border-radius: 999px;
}

.docs-nav__group {
  margin-bottom: 24px;
}

.docs-nav__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: 0 12px;
  margin-bottom: 6px;
}

.docs-nav__link {
  display: block;
  padding: 7px 12px;
  font-size: 0.88rem;
  color: var(--ink-500);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.docs-nav__link:hover {
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.5);
}

.docs-nav__link.is-active {
  color: var(--sea-600);
  background: rgba(77, 168, 182, 0.08);
  border-left-color: var(--sea-500);
  font-weight: 500;
}

/* ====== Main content ====== */
.docs-main {
  flex: 1;
  min-width: 0;
  padding: 8px 48px 80px 48px;
}

.docs-section {
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.docs-section:first-child {
  padding-top: 24px;
}

.docs-section:last-of-type {
  border-bottom: none;
}

.docs-section__header {
  margin-bottom: 16px;
}

.docs-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sea-500);
  margin-bottom: 8px;
}

h1 {
  font-family: var(--font-bradford);
  font-style: italic;
  font-weight: 450;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.2;
  color: var(--ink-900);
  margin-bottom: 16px;
}

h2 {
  font-family: var(--font-bradford);
  font-weight: 450;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  line-height: 1.25;
  color: var(--ink-900);
  margin-bottom: 12px;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-700);
  margin-top: 32px;
  margin-bottom: 8px;
}

/* ====== Step blocks (indented h3 content) ====== */
.docs-step {
  margin-top: 28px;
  margin-left: 20px;
  padding-left: 24px;
  border-left: 2px solid var(--paper-300);
  position: relative;
}

.docs-step h3 {
  margin-top: 0;
  margin-left: -24px;
  padding-left: 24px;
  position: relative;
}

.docs-step h3::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sea-500);
  box-shadow: 0 0 0 3px rgba(77, 168, 182, 0.15);
}

.docs-step p,
.docs-step .docs-figure,
.docs-step .docs-callout,
.docs-step ul {
  /* Content within steps inherits the indent */
}

.docs-step .docs-figure {
  max-width: 720px;
}

.docs-step + .docs-step {
  margin-top: 32px;
}

/* ====== Sub-content block (lighter indent for non-step sub-sections) ====== */
.docs-sub {
  margin-top: 24px;
  margin-left: 16px;
  padding-left: 20px;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.docs-sub h3 {
  margin-top: 0;
}

.docs-sub + .docs-sub {
  margin-top: 28px;
}

/* ====== Param card (indented parameter list) ====== */
.docs-params {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin: 12px 0 16px;
  max-width: 640px;
}

.docs-params li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.docs-params li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.docs-section p {
  color: var(--ink-700);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 720px;
}

.docs-section ul {
  padding-left: 20px;
  margin-bottom: 16px;
  max-width: 720px;
}

.docs-section li {
  color: var(--ink-700);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 6px;
}

.docs-section a {
  color: var(--sea-600);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(47, 123, 134, 0.3);
  transition: text-decoration-color 0.2s ease;
}

.docs-section a:hover {
  text-decoration-color: var(--sea-600);
}

/* ====== Figures (screenshots) ====== */
.docs-figure {
  margin: 20px 0 24px;
  max-width: 780px;
}

.docs-figure img {
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.docs-figure img:hover {
  box-shadow: 0 8px 32px rgba(20, 18, 14, 0.14);
  transform: translateY(-2px);
}

.docs-figure figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-400);
  font-style: italic;
}

.docs-figure--small {
  max-width: 320px;
}

/* ====== Callouts ====== */
.docs-callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  margin: 20px 0;
  max-width: 720px;
}

.docs-callout__icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.docs-callout strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--ink-900);
}

.docs-callout p {
  font-size: 0.88rem;
  color: var(--ink-500);
  margin-bottom: 0;
  line-height: 1.6;
}

.docs-callout--info {
  background: rgba(77, 168, 182, 0.06);
  border-color: rgba(77, 168, 182, 0.2);
}

.docs-callout--warning {
  background: rgba(229, 164, 111, 0.08);
  border-color: rgba(229, 164, 111, 0.25);
}

/* ====== Platforms grid ====== */
.docs-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
  max-width: 720px;
}

.docs-platform {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.docs-platform:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.docs-platform strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.docs-platform span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-400);
  margin-bottom: 6px;
}

.docs-platform a {
  font-size: 0.8rem;
  color: var(--sea-600);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(47, 123, 134, 0.3);
}

.docs-platform a:hover {
  text-decoration-color: var(--sea-600);
}

/* ====== Export formats ====== */
.docs-formats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
  max-width: 720px;
}

.docs-format {
  display: flex;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.docs-format__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.docs-format strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.docs-format p {
  font-size: 0.82rem;
  color: var(--ink-400);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ====== Footer ====== */
.docs-footer {
  padding: 32px 0;
  text-align: center;
}

.docs-footer p {
  font-size: 0.85rem;
  color: var(--ink-400);
  max-width: none;
}

/* ====== Overlay for mobile sidebar ====== */
.docs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 49;
  backdrop-filter: blur(2px);
}

.docs-overlay.is-visible {
  display: block;
}

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .docs-header__actions .docs-btn--ghost {
    display: none;
  }

  .docs-mobile-toggle {
    display: flex;
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: 280px;
    min-width: 280px;
    background: var(--glass-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--glass-border);
    box-shadow: 8px 0 32px rgba(20, 18, 14, 0.12);
    padding-top: calc(var(--header-h) + 16px);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
    height: 100vh;
  }

  .docs-sidebar.is-open {
    transform: translateX(0);
  }

  .docs-main {
    padding: 8px 20px 80px;
  }

  .docs-figure {
    max-width: 100%;
  }

  .docs-platforms,
  .docs-formats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .docs-header {
    padding: 10px 16px;
    border-radius: var(--radius-md);
  }

  .docs-brand__text {
    display: none;
  }

  .docs-header-wrap {
    top: 8px;
    padding: 0 12px;
  }

  .docs-main {
    padding: 8px 16px 60px;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}

/* ====== Scroll padding for anchor links ====== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 48px);
}

/* ====== Animations ====== */
.docs-section {
  opacity: 0;
  transform: translateY(16px);
  animation: docs-fade-in 0.5s var(--ease-out) forwards;
}

.docs-section:nth-child(1) { animation-delay: 0s; }
.docs-section:nth-child(2) { animation-delay: 0.05s; }
.docs-section:nth-child(3) { animation-delay: 0.1s; }
.docs-section:nth-child(4) { animation-delay: 0.15s; }
.docs-section:nth-child(5) { animation-delay: 0.2s; }
.docs-section:nth-child(6) { animation-delay: 0.25s; }
.docs-section:nth-child(7) { animation-delay: 0.3s; }
.docs-section:nth-child(8) { animation-delay: 0.35s; }

@keyframes docs-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-section {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
