/* ============================================================
   Anchor — /docs (Docs) page styles
   ============================================================
   Design tokens (colors, fonts) mirrored from client/index.css.
   Long-form prose layout with a single readable column plus a
   Table of Contents and a definition-list block for the role
   cheat sheet.
   ============================================================ */

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

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/_site/fonts/dm-sans-variable.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/_site/fonts/dm-sans-italic-variable.woff2") format("woff2");
}

:root {
  --font-body: system-ui, -apple-system, sans-serif;
  --font-display: "DM Sans", sans-serif;

  --color-bg: #eae6ec;
  --color-text: #1a1523;
  --color-text-light: #1a152394;
  --color-surface: #ffffff;
  --color-border: #dedae1;

  --content-width: 760px;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* --- Skip link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px 16px;
  background: var(--color-text);
  color: var(--color-surface);
  text-decoration: none;
  border-radius: 0 0 6px 0;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* --- Header ---
   Matches the main app's PlatformHeader: 48px height, logo + sign-in.
*/
.site-header {
  height: 48px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.nav-inner {
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  height: 17px;
  width: auto;
  margin-left: 4px;
}

.logo-wordmark {
  height: 18px;
  width: auto;
  margin-left: 8px;
}

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

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text-light);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link[aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

/* --- Supported Agents dropdown ---
   Pure CSS: reveals on :hover and :focus-within for keyboard users. */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-chevron {
  color: currentColor;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.nav-dropdown:hover .nav-dropdown-chevron,
.nav-dropdown:focus-within .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow:
    0 1px 3px rgba(26, 21, 35, 0.06),
    0 12px 28px -8px rgba(26, 21, 35, 0.18);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s 0.15s;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s 0s;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 4px;
}

.nav-dropdown-menu a:hover {
  background: #14011e0a;
}

.nav-dropdown-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}

.nav-dropdown-all svg {
  margin-left: auto;
}

.nav-dropdown-divider {
  height: 1px;
  margin: 4px 8px;
  background: var(--color-border);
}

.nav-dropdown-all {
  color: var(--color-text-light) !important;
  font-weight: 500 !important;
}

.nav-dropdown-all:hover {
  color: var(--color-text) !important;
}

.btn-sign-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  height: 28px;
  margin-left: 24px;
  background: rgba(26, 21, 35, 0.07);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-sign-in:hover {
  text-decoration: none;
  background: rgba(26, 21, 35, 0.12);
}

/* --- Learn article layout --- */
.learn {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 72px 24px 120px;
}

.learn-header {
  margin-bottom: 40px;
}

.learn-headline {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin-bottom: 12px;
}

.learn-subheadline {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-text-light);
  max-width: 580px;
}

/* --- Table of contents --- */
.learn-toc {
  background: transparent;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 8px;
  margin-bottom: 56px;
}

.toc-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.learn-toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.learn-toc li {
  counter-increment: toc;
  font-size: 14px;
  line-height: 1.5;
  padding-left: 28px;
  position: relative;
}

.learn-toc li::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  top: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  min-width: 20px;
}

.learn-toc ol a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.learn-toc ol a:hover {
  border-bottom-color: var(--color-text-light);
}

/* --- Sections --- */
.learn section {
  margin-bottom: 44px;
}

.learn h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin-bottom: 16px;
  scroll-margin-top: 64px;
}

.learn h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: 64px;
}

.learn p {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 14px;
  color: var(--color-text);
}

.learn p:last-child {
  margin-bottom: 0;
}

.learn ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
}

.learn section ul li {
  font-size: 15px;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
}

.learn section ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text);
}

.learn strong {
  font-weight: 600;
}

.learn em {
  font-style: italic;
}

.learn a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.learn a:hover {
  text-decoration-thickness: 2px;
}

.learn dfn {
  font-style: italic;
  font-weight: 500;
}

.learn code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  background: rgba(26, 21, 35, 0.06);
  border-radius: 4px;
  padding: 1px 6px;
}

/* --- Subheading (h4 inside a section) --- */
.learn-subhead {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-top: 24px;
  margin-bottom: 10px;
  scroll-margin-top: 64px;
}

/* --- Tables (supported file types, etc.) --- */
.learn-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
}

.learn-table thead th {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  text-align: left;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.learn-table tbody th,
.learn-table tbody td {
  padding: 12px 16px;
  vertical-align: top;
  border-top: 1px solid var(--color-border);
}

.learn-table tbody tr:first-child th,
.learn-table tbody tr:first-child td {
  border-top: none;
}

.learn-table tbody th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  width: 140px;
}

.learn-table tbody td {
  color: var(--color-text);
}

/* --- Role cheat sheet (definition list) --- */
.learn-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 20px;
  margin: 16px 0 18px;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.learn-dl dt {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.learn-dl dd {
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
}

/* --- Need-help block (between content and closing CTA) --- */
.learn-help {
  margin-top: 48px;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.learn-help-body {
  flex: 1 1 260px;
}

.learn-help-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 2px;
  color: var(--color-text);
}

.learn-help-text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-light);
  margin: 0;
}

.learn .learn-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.learn .learn-help-link:hover {
  border-color: var(--color-text);
  background: var(--color-surface);
  text-decoration: none;
}

@media (max-width: 520px) {
  .learn-help {
    padding: 18px 20px;
  }

  .learn-help-link {
    align-self: flex-start;
  }
}

/* --- Closing CTA --- */
.learn-cta {
  margin-top: 24px;
  padding: 40px 28px;
  background: var(--color-text);
  color: #ffffff;
  border-radius: 16px;
  text-align: center;
}

.learn-cta h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  color: #ffffff;
}

.learn-cta p {
  color: #eae6ecc0;
  margin-bottom: 22px;
}

.learn-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.learn-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.15);
}

/* --- Hamburger menu (hidden on desktop) --- */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  /* --- Mobile nav: hamburger menu --- */
  .nav-hamburger {
    display: flex;
  }

  .site-header {
    position: relative;
    z-index: 100;
  }

  .nav-actions {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px -8px rgba(26, 21, 35, 0.12);
    padding: 12px 16px;
    flex-direction: column;
    gap: 4px;
    z-index: 99;
  }

  .nav-actions.is-open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 6px;
    display: block;
  }

  .nav-link:hover {
    background: rgba(26, 21, 35, 0.04);
  }

  .btn-sign-in {
    margin-left: 0;
    margin-top: 8px;
    justify-content: center;
    height: 40px;
  }

  .nav-dropdown-menu {
    display: none !important;
  }

  .nav-dropdown-chevron {
    display: none;
  }

  .nav-dropdown-trigger {
    padding: 10px 12px;
    border-radius: 6px;
    display: block;
  }

  .learn {
    padding: 48px 20px 80px;
  }

  .learn-headline {
    font-size: 40px;
  }

  .learn-subheadline {
    font-size: 16px;
  }

  .learn h2 {
    font-size: 22px;
  }

  .learn h3 {
    font-size: 17px;
  }

  .learn-toc {
    padding: 18px 20px;
  }

  .learn-dl {
    grid-template-columns: 1fr;
    gap: 4px 0;
    padding: 18px 20px;
  }

  .learn-dl dt {
    margin-top: 8px;
  }

  .learn-dl dt:first-child {
    margin-top: 0;
  }

  .learn-table {
    font-size: 13px;
  }

  .learn-table thead th,
  .learn-table tbody th,
  .learn-table tbody td {
    padding: 10px 12px;
  }

  .learn-table tbody th {
    width: auto;
    white-space: normal;
  }

  .learn-cta {
    padding: 32px 22px;
  }
}

/* ============================================================
   Site footer
   ============================================================ */

.site-footer {
  background: var(--color-text);
  color: #eae6ec;
  padding: 64px 24px 32px;
  margin-top: 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 64px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 280px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-logo-icon {
  height: 18px;
  width: auto;
  filter: invert(1);
}

.footer-logo-wordmark {
  height: 19px;
  width: auto;
  filter: invert(1);
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: 13px;
  color: #eae6ecb0;
  line-height: 1.5;
  margin-top: -2px;
}

.footer-address {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: normal;
  color: #eae6eccc;
  line-height: 1.6;
  margin-top: 4px;
}

.footer-email {
  font-family: var(--font-body);
  font-size: 13px;
  color: #eae6ec;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #eae6ec44;
  align-self: flex-start;
}

.footer-email:hover {
  text-decoration-color: #eae6ec;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #eae6ec88;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-family: var(--font-body);
  font-size: 14px;
  color: #eae6ec;
  text-decoration: none;
}

.footer-col a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid #eae6ec18;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 12px;
  color: #eae6ec66;
}

@media (max-width: 840px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-cols {
    gap: 28px;
  }
}

@media (max-width: 520px) {
  .site-footer {
    padding: 48px 20px 24px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Supported Agents dropdown ---
   Pure CSS: reveals on :hover and :focus-within for keyboard users.
   Duplicated from hello/style.css since each page is self-contained. */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-chevron {
  color: currentColor;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.nav-dropdown:hover .nav-dropdown-chevron,
.nav-dropdown:focus-within .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow:
    0 1px 3px rgba(26, 21, 35, 0.06),
    0 12px 28px -8px rgba(26, 21, 35, 0.18);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s 0.15s;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s 0s;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 4px;
}

.nav-dropdown-menu a:hover {
  background: #14011e0a;
}

.nav-dropdown-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}

.nav-dropdown-all svg {
  margin-left: auto;
}

.nav-dropdown-divider {
  height: 1px;
  margin: 4px 8px;
  background: var(--color-border);
}

.nav-dropdown-all {
  color: var(--color-text-light) !important;
  font-weight: 500 !important;
}

.nav-dropdown-all:hover {
  color: var(--color-text) !important;
}

/* Extra breathing room between the text nav links and the Sign-in button */
.btn-sign-in {
  margin-left: 12px;
}
