/* ═══════════════════════════════════════════════════════════════════
   docs.loteflow.com — docs.css
   Article layout + prose typography + prose components + home page.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Doc layout ─────────────────────────────────────────────────── */
.doc { display: grid; grid-template-columns: minmax(0, 1fr) var(--toc-w); gap: 44px; }
.doc--with-toc .doc__article { max-width: 780px; }
.doc:not(.doc--with-toc) { grid-template-columns: minmax(0, 1fr); }
.doc:not(.doc--with-toc) .doc__article { max-width: 780px; }
.doc__article { container-type: inline-size; }
.doc__toc { position: sticky; top: calc(var(--topbar-h) + 34px); align-self: start; max-height: calc(100vh - var(--topbar-h) - 60px); overflow-y: auto; }

/* Wide pages (frontmatter `wide: true`): use the viewport on large screens */
@media (min-width: 1200px) {
  body.doc-wide { --container: 1560px; }
  body.doc-wide .main { padding: 34px 40px 60px; }
  body.doc-wide .doc { grid-template-columns: minmax(0, 1fr) 200px; gap: 32px; }
  body.doc-wide .doc--with-toc .doc__article,
  body.doc-wide .doc__article { max-width: none; }
}

.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12.5px; color: var(--muted-2); margin-bottom: 18px; }
.crumbs a { color: var(--muted-2); }
.crumbs a:hover { color: var(--pine-3); text-decoration: none; }
.crumbs__sep { display: inline-flex; color: var(--line-2); }

.doc__header h1 {
  font-size: clamp(28px, 4vw, 36px); line-height: 1.18; letter-spacing: -0.015em;
  font-weight: 700; margin: 0 0 12px; color: var(--pine);
}
.doc__lede { font-size: 17.5px; color: var(--muted); margin: 0; max-width: 640px; }

/* ── TOC ────────────────────────────────────────────────────────── */
.toc__title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin-bottom: 8px; }
.toc__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc__item a {
  display: block; padding: 4px 0 4px 14px;
  color: var(--muted); font-size: 13px; line-height: 1.45;
  border-left: 2px solid transparent; margin-left: -1.5px;
}
.toc__item--h3 a { padding-left: 26px; font-size: 12.5px; }
.toc__item a:hover { color: var(--pine-3); text-decoration: none; }
.toc__item a.is-current { color: var(--pine-3); font-weight: 600; border-left-color: var(--gold); }

/* ── Pager (prev / next) ────────────────────────────────────────── */
.doc__pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 54px; padding-top: 26px; border-top: 1px solid var(--line); }
.pager-card {
  display: flex; flex-direction: column; gap: 3px; max-width: 48%;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); transition: border-color .15s, box-shadow .15s;
}
.pager-card:hover { text-decoration: none; border-color: var(--gold); box-shadow: var(--shadow-sm); }
.pager-card--next { margin-left: auto; text-align: right; }
.pager-card__label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted-2); }
.pager-card__title { font-weight: 650; font-size: 14.5px; color: var(--pine-3); }

/* ═══════════════════════════════════════════════════════════════════
   Prose
   ═══════════════════════════════════════════════════════════════════ */
.prose { font-size: 15.5px; line-height: 1.75; }
.prose > p { margin: 14px 0; }
.prose h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--pine); margin: 52px 0 6px; padding-top: 26px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--topbar-h) + 18px);
}
.prose h2:first-child { border-top: 0; padding-top: 0; margin-top: 36px; }
.prose h3 {
  font-size: 18.5px; font-weight: 650; color: var(--text);
  margin: 34px 0 4px; scroll-margin-top: calc(var(--topbar-h) + 18px);
}
.prose ul, .prose ol { padding-left: 24px; margin: 12px 0; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--gold); font-weight: 600; }
.prose strong { font-weight: 650; color: var(--pine-2); }
.prose code {
  font-family: var(--mono); font-size: .86em;
  background: var(--cream-3); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 5px; color: var(--pine-3);
}
.prose blockquote { margin: 16px 0; padding: 4px 18px; border-left: 3px solid var(--gold); color: var(--muted); background: var(--cream-2); border-radius: 0 8px 8px 0; }

.prose table {
  width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px;
  background: var(--white); border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.prose thead { background: var(--pine-2); color: #F3EAD7; }
.prose th { text-align: left; font-weight: 600; padding: 9px 13px; font-size: 13px; }
.prose td { padding: 9px 13px; border-top: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:nth-child(even) { background: var(--cream-2); }

/* ── Callouts ───────────────────────────────────────────────────── */
.callout {
  display: flex; gap: 12px; margin: 20px 0; padding: 13px 15px;
  border-radius: 11px; border: 1px solid var(--line);
  background: var(--white); box-shadow: var(--shadow-sm);
}
.callout__icon { display: inline-flex; margin-top: 2px; }
.callout__label { display: block; font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 2px; }
.callout__body p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.callout--tip { background: var(--phase-sales-bg); border-color: rgba(61, 122, 87, .25); }
.callout--tip .callout__icon, .callout--tip .callout__label { color: var(--ok); }
.callout--nota { background: var(--phase-marketing-bg); border-color: rgba(75, 127, 153, .22); }
.callout--nota .callout__icon, .callout--nota .callout__label { color: var(--info); }
.callout--importante { background: #FDF3E4; border-color: rgba(201, 119, 59, .35); }
.callout--importante .callout__icon, .callout--importante .callout__label { color: var(--warn); }
.callout--cuidado { background: #FBEDED; border-color: rgba(185, 28, 28, .3); }
.callout--cuidado .callout__icon, .callout--cuidado .callout__label { color: var(--danger); }

/* ── Steps ──────────────────────────────────────────────────────── */
.steps { list-style: none; margin: 20px 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps__item { display: flex; gap: 13px; }
.steps__num {
  flex-shrink: 0; width: 27px; height: 27px; border-radius: 50%;
  background: var(--pine-2); color: #F3EAD7;
  font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.steps__body strong { font-size: 15px; color: var(--pine-2); }
.steps__body p { margin: 3px 0 0; font-size: 14.5px; color: var(--muted); }

/* ── Screenshot ─────────────────────────────────────────────────── */
.screenshot { margin: 20px 0; }
.screenshot__frame {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--white); box-shadow: var(--shadow-sm);
}
.screenshot__frame img { display: block; width: 100%; height: auto; }
.screenshot__placeholder {
  min-height: 190px; display: flex; flex-direction: column; gap: 7px;
  align-items: center; justify-content: center;
  color: var(--muted-2); font-size: 13.5px;
  background: repeating-linear-gradient(-45deg, var(--cream-2) 0 12px, var(--cream) 12px 24px);
}
.screenshot__placeholder code { font-size: 12px; color: var(--gold); background: none; border: 0; }
.screenshot figcaption { margin-top: 8px; font-size: 13px; color: var(--muted-2); text-align: center; }

/* ── kbd + ui-path ──────────────────────────────────────────────── */
.kbd {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  background: var(--white); color: var(--muted);
  padding: 1px 6px; border-radius: 6px; white-space: nowrap;
}
.uipath { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; vertical-align: baseline; }
.uipath__part {
  font-size: 12.5px; font-weight: 600; color: var(--pine-3);
  background: var(--pine-soft); border: 1px solid rgba(27, 77, 58, .18);
  padding: 1px 8px; border-radius: 6px; white-space: nowrap;
}
.uipath__sep { color: var(--muted-2); font-size: 12px; }

/* ── FAQ ────────────────────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 9px; margin: 20px 0; }
.faq__item {
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--white); overflow: hidden;
}
.faq__item summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; font-weight: 600; font-size: 14.5px; color: var(--pine-2);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .ico { color: var(--muted-2); transition: transform .18s; }
.faq__item[open] summary .ico { transform: rotate(180deg); }
.faq__a { padding: 0 16px 14px; font-size: 14.5px; color: var(--muted); }
.faq__a p { margin: 0 0 8px; }
.faq__a p:last-child { margin-bottom: 0; }

/* ── Related cards ──────────────────────────────────────────────── */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.related__card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--white); transition: border-color .15s, box-shadow .15s;
}
.related__card:hover { text-decoration: none; border-color: var(--gold); box-shadow: var(--shadow-sm); }
.related__card strong { color: var(--pine-3); font-size: 14.5px; }
.related__card span { font-size: 13px; color: var(--muted); }

/* ── Glossary ───────────────────────────────────────────────────── */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 20px 0; padding: 0; }
.glossary__item { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; }
.glossary__item dt { font-weight: 700; font-size: 13.5px; color: var(--pine-3); margin-bottom: 2px; }
.glossary__item dd { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ═══════════════════════════════════════════════════════════════════
   Home
   ═══════════════════════════════════════════════════════════════════ */
.home-hero { padding: 58px 0 34px; text-align: center; }
.home-hero__inner { max-width: 660px; margin: 0 auto; }
.home-hero h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.02em; color: var(--pine); margin: 0 0 12px; font-weight: 750; }
.home-hero h1 em { font-style: normal; color: var(--accent); }
.home-hero__sub { color: var(--muted); font-size: 17px; margin: 0 0 26px; }
.home-hero__search {
  width: 100%; display: flex; align-items: center; gap: 11px;
  font: inherit; font-size: 15.5px; color: var(--muted);
  background: var(--white); border: 1px solid var(--line-2); border-radius: 13px;
  padding: 15px 18px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.home-hero__search:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }
.home-hero__quick { margin-top: 16px; font-size: 13.5px; color: var(--muted-2); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.home-hero__quick a {
  color: var(--pine-3); font-weight: 600;
  background: var(--pine-soft); border: 1px solid rgba(27, 77, 58, .16);
  padding: 4px 12px; border-radius: 999px;
}
.home-hero__quick a:hover { text-decoration: none; border-color: var(--gold); }

.home-featured { margin: 16px 0 8px; }
.feature-card {
  display: flex; align-items: center; gap: 24px;
  background: linear-gradient(135deg, var(--pine-2), var(--pine-3) 70%);
  border-radius: 16px; padding: 26px 30px; color: #EFE8D8;
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.feature-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.feature-card::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 106, .25), transparent 70%);
}
.feature-card__text { flex: 1; }
.feature-card__eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-2); }
.feature-card h2 { margin: 8px 0 6px; font-size: 23px; letter-spacing: -0.01em; color: #fff; }
.feature-card p { margin: 0 0 14px; color: rgba(239, 232, 216, .82); font-size: 14.5px; max-width: 520px; }
.feature-card__cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 14px; color: var(--gold-2); }
.feature-card__art { color: rgba(214, 185, 140, .5); flex-shrink: 0; display: flex; align-items: center; }
.feature-card__art .logo-mark { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .25)); }

.home-section { margin: 34px 0; }
.home-section__head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 16px; }
.home-section__icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: var(--white); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--gold);
}
.home-section__head h2 { margin: 0; font-size: 20px; color: var(--pine); }
.home-section__head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 13px; }
.home-grid--tight { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.page-card {
  position: relative; display: flex; flex-direction: column; gap: 5px;
  background: var(--white); border: 1px solid var(--line); border-radius: 13px;
  padding: 17px 18px 15px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.page-card:hover { text-decoration: none; border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.page-card h3 { margin: 0; font-size: 15.5px; color: var(--pine-2); }
.page-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.page-card__go {
  position: absolute; top: 14px; right: 14px;
  color: var(--line-2); transition: color .15s, transform .15s;
}
.page-card:hover .page-card__go { color: var(--gold); transform: translateX(2px); }
.page-card--soon { border-style: dashed; background: transparent; box-shadow: none; }
.page-card--soon h3 { color: var(--muted-2); }

/* ── 404 ────────────────────────────────────────────────────────── */
.notfound { text-align: center; padding: 90px 20px; max-width: 520px; margin: 0 auto; }
.notfound__logo { display: inline-flex; margin-bottom: 14px; }
.notfound__code { display: block; font-size: 15px; font-weight: 800; letter-spacing: .2em; color: var(--accent); }
.notfound h1 { font-size: 32px; color: var(--pine); margin: 8px 0 10px; }
.notfound p { color: var(--muted); margin: 0 0 26px; }
.notfound__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-brand {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pine-2); color: #F3EAD7; font-weight: 600; font-size: 14.5px;
  padding: 10px 18px; border-radius: 10px;
}
.btn-brand:hover { background: var(--pine-3); text-decoration: none; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc__toc { display: none; }
}
