/* Kriti AI documentation: single docs (parent theme repeater markup) and the docs index. */

:root {
  --kd-ink: #0f172a;
  --kd-text: #334155;
  --kd-muted: #64748b;
  --kd-line: #e5e7eb;
  --kd-soft: #f8fafc;
  --kd-brand: #4f46e5;
  --kd-brand-soft: #eef2ff;
}

/* ---------- Single doc: sidebar + content ---------- */
body.single-documentation #content.site-content {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  max-width: 1200px;
  margin: 48px auto 80px;
  padding: 0 24px;
}
body.single-documentation #secondary.widget-area {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  width: auto;
  float: none;
  padding: 0;
}
body.single-documentation #primary.content-area {
  width: auto;
  float: none;
  min-width: 0;
}
body.single-documentation .repeater-button ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.single-documentation .repeater-button > ul > li {
  margin: 0 0 14px;
}
body.single-documentation .repeater-button a.docu-title {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  /* The parent theme paints section names as a pill; keep them plain text. */
  background: none !important;
  color: var(--kd-ink) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
body.single-documentation .repeater-button a.docu-sub-title {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--kd-line);
  color: var(--kd-muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
body.single-documentation .repeater-button a:hover,
body.single-documentation .repeater-button a:focus-visible {
  color: var(--kd-brand);
  border-left-color: var(--kd-brand);
}

body.single-documentation .repeater-contents {
  color: var(--kd-text);
  font-size: 16px;
  line-height: 1.7;
}
body.single-documentation .repeater-wrap {
  scroll-margin-top: 96px;
}
body.single-documentation .repeater-main-title {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--kd-line);
}
body.single-documentation .repeater-contents > .repeater-main-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
body.single-documentation .repeater-main-title h1.title {
  margin: 0 0 8px;
  color: var(--kd-ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}
body.single-documentation .repeater-sub-title h3.title {
  margin: 28px 0 8px;
  color: var(--kd-ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}
body.single-documentation .repeater-contents p {
  margin: 0 0 14px;
}
body.single-documentation .repeater-contents ul,
body.single-documentation .repeater-contents ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}
body.single-documentation .repeater-contents ul { list-style: disc; }
body.single-documentation .repeater-contents ol { list-style: decimal; }
body.single-documentation .repeater-contents li {
  margin: 0 0 6px;
}
body.single-documentation .repeater-contents a {
  color: var(--kd-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.single-documentation .repeater-contents strong {
  color: var(--kd-ink);
  font-weight: 600;
}
body.single-documentation .repeater-contents code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--kd-ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}
body.single-documentation .repeater-contents pre {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}
body.single-documentation .repeater-contents pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}
body.single-documentation .repeater-contents table {
  width: 100%;
  margin: 8px 0 20px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}
body.single-documentation .repeater-contents th,
body.single-documentation .repeater-contents td {
  padding: 10px 12px;
  border: 1px solid var(--kd-line);
  text-align: left;
  vertical-align: top;
}
body.single-documentation .repeater-contents th {
  background: var(--kd-soft);
  color: var(--kd-ink);
  font-weight: 600;
}
body.single-documentation .kriti-docs-figure {
  margin: 20px 0 24px;
}
body.single-documentation .kriti-docs-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--kd-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
body.single-documentation .kriti-docs-figure figcaption {
  margin-top: 8px;
  color: var(--kd-muted);
  font-size: 14px;
}
body.single-documentation .kriti-docs-note,
body.single-documentation .kriti-docs-tip {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--kd-brand);
  border-radius: 6px;
  background: var(--kd-brand-soft);
}
body.single-documentation .kriti-docs-tip {
  border-left-color: #059669;
  background: #ecfdf5;
}

@media (max-width: 900px) {
  body.single-documentation #content.site-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
    padding: 0 16px;
  }
  body.single-documentation #secondary.widget-area {
    position: static;
    max-height: none;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--kd-line);
  }
  body.single-documentation .repeater-contents table {
    display: block;
    overflow-x: auto;
  }
}

/* ---------- Docs index ---------- */
.kriti-docs-index {
  max-width: 1200px;
  margin: 48px auto 80px;
  padding: 0 24px;
}
.kriti-docs-index__intro {
  max-width: 720px;
  margin: 0 0 32px;
  color: #334155;
  font-size: 18px;
  line-height: 1.6;
}
.kriti-docs-index__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.kriti-docs-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.kriti-docs-card:hover,
.kriti-docs-card:focus-visible {
  border-color: #c7d2fe;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.12);
  transform: translateY(-2px);
}
.kriti-docs-card__step {
  margin: 0 0 10px;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kriti-docs-card__title {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}
.kriti-docs-card__excerpt {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Product sections (index) and product pages ---------- */
.kriti-docs-products {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 40px;
}
.kriti-docs-products a {
  padding: 8px 16px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.kriti-docs-products a:hover,
.kriti-docs-products a:focus-visible {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.kriti-docs-section {
  margin: 0 0 56px;
  scroll-margin-top: 96px;
}
.kriti-docs-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: end;
  margin: 0 0 20px;
}
.kriti-docs-section__title {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  font-weight: 700;
}
.kriti-docs-section__desc {
  grid-column: 1;
  margin: 0;
  color: #64748b;
  font-size: 16px;
}
.kriti-docs-section__all {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #4f46e5;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.kriti-docs-breadcrumb {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
}
.kriti-docs-breadcrumb a {
  color: #4f46e5;
  text-decoration: none;
}
@media (max-width: 700px) {
  .kriti-docs-section__head {
    grid-template-columns: minmax(0, 1fr);
  }
  .kriti-docs-section__all {
    grid-column: 1;
    grid-row: auto;
  }
}
