.api-seq { margin: 0; }
.api-seq-actors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 4px; }
.api-seq-actors span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px; border: 1px solid #cfdcec; border-radius: 10px; background: #f3f7fc; color: #1d2b42; font-weight: 700; font-size: .85rem; text-align: center; }
.api-seq-actors svg { width: 16px; height: 16px; color: var(--docs-accent); flex: 0 0 auto; }
.api-seq-lanes { position: relative; padding: 20px 0 6px; background-image: linear-gradient(#c9d6e6 55%, transparent 0), linear-gradient(#c9d6e6 55%, transparent 0), linear-gradient(#c9d6e6 55%, transparent 0); background-size: 1px 11px, 1px 11px, 1px 11px; background-repeat: repeat-y, repeat-y, repeat-y; background-position: 16.66% 0, 50% 0, 83.33% 0; }
.api-seq-msg { position: relative; margin: 0 0 22px; }
.api-seq-msg--app-api { margin-left: 16.66%; width: 33.34%; }
.api-seq-msg--api-engine { margin-left: 50%; width: 33.34%; }
.api-seq-label { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 26px 7px; text-align: center; }
.api-seq-label code { padding: 3px 9px; border-radius: 999px; background: #e8eef6; color: #234e78; font-size: .74rem; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.api-seq-label small { color: #65738a; font-size: .76rem; line-height: 1.45; }
.api-seq-badge { position: absolute; top: calc(100% - 11px); display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: var(--docs-accent); color: white; font-size: .72rem; font-weight: 800; z-index: 1; }
.api-seq-msg--right .api-seq-badge { left: -11px; }
.api-seq-msg--left .api-seq-badge { right: -11px; }
.api-seq-line { display: block; height: 2px; background: #9db4d0; position: relative; }
.api-seq-line::after { content: ""; position: absolute; top: -4px; border: 5px solid transparent; }
.api-seq-msg--right .api-seq-line::after { right: -1px; border-left-color: #9db4d0; border-right-width: 0; }
.api-seq-msg--left .api-seq-line::after { left: -1px; border-right-color: #9db4d0; border-left-width: 0; }
@media (max-width: 719px) {
  .api-seq-actors { grid-template-columns: 1fr; gap: 6px; }
  .api-seq-lanes { background: none; padding-top: 12px; }
  .api-seq-msg--app-api, .api-seq-msg--api-engine { margin-left: 0; width: auto; }
  .api-seq-msg { margin-bottom: 10px; padding: 12px 14px 12px 42px; border: 1px solid #e1e8f1; border-radius: 11px; background: #f8fafc; }
  .api-seq-label { align-items: flex-start; text-align: left; padding: 0; }
  .api-seq-badge { top: 12px; left: 12px !important; right: auto !important; }
  .api-seq-line { display: none; }
}
.api-doc-key-concept { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 26px; padding: 18px 20px; border: 1px solid #bfdbf5; border-radius: 12px; color: #234e78; background: #eef7ff; }
.api-doc-key-concept svg { width: 20px; flex: 0 0 auto; margin-top: 2px; }
.api-doc-key-concept p { margin: 0; line-height: 1.6; }
.api-doc-key-concept--important { border-left: 4px solid var(--docs-accent); }
.api-doc-section { margin-bottom: 24px; padding: 26px; border: 1px solid #dde5ef; border-radius: 14px; background: white; box-shadow: 0 5px 20px rgba(27, 47, 75, .035); }
.api-doc-section > h2 { margin: 0 0 9px; color: #1d2b42; font: 700 1.35rem/1.25 Outfit, sans-serif; }
.api-doc-section > p { margin: 0 0 18px; color: #65738a; line-height: 1.65; }
.api-doc-flow { display: grid; gap: 10px; }
.api-doc-flow a { display: grid; grid-template-columns: 38px 1fr 20px; gap: 13px; align-items: center; padding: 16px; border: 1px solid #e1e8f1; border-radius: 11px; color: inherit; text-decoration: none; transition: border-color .16s ease, transform .16s ease; }
.api-doc-flow a:hover { border-color: #9fc5e9; transform: translateX(2px); }
.api-doc-flow a > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: white; background: var(--docs-accent); font-weight: 750; }
.api-doc-flow h3, .api-doc-choice-grid h3 { margin: 0 0 3px; font-size: .95rem; }
.api-doc-flow p, .api-doc-choice-grid p { margin: 0; color: #6b788c; font-size: .82rem; line-height: 1.5; }
.api-doc-flow a > svg { width: 17px; color: #8290a4; }
/* `.api-doc-model-level`, `.api-doc-note` y `.api-metric-availability-note` se
   usaban en las plantillas sin ninguna regla: los dos niveles del catálogo
   salían como icono y texto sueltos al lado de las tarjetas de `.api-doc-flow`,
   y `model_note` —un párrafo largo— era indistinguible de la entradilla de su
   sección. Se les da el tratamiento que ya tienen sus hermanos. */
.api-doc-model-level { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; align-items: start; padding: 16px; border: 1px solid #e1e8f1; border-radius: 11px; }
.api-doc-model-level > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--docs-accent); background: var(--docs-accent-soft); }
.api-doc-model-level > span svg { width: 18px; }
.api-doc-note { margin: 16px 0 0; padding-left: 14px; border-left: 3px solid var(--docs-accent-line); color: #65738a; font-size: .86rem; line-height: 1.65; }
.api-metric-availability-note { margin: 0 0 12px; color: #80510b; font-size: .82rem; }

.api-doc-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.api-doc-choice-grid a { padding: 18px; border: 1px solid #e1e8f1; border-radius: 11px; color: inherit; text-decoration: none; }
.api-doc-choice-grid a:hover { border-color: #9fc5e9; background: #f8fbfe; }
.api-doc-choice-grid svg { width: 22px; margin-bottom: 12px; color: var(--docs-accent); }
/* Los tres pasos del alta. Numerados como `.api-doc-flow` pero sin enlace:
   describen el proceso, y uno de ellos —la invitación por correo— no tiene
   página a la que llevar. Los destinos son las tarjetas de debajo. */
.api-access-steps { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.api-access-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 13px; align-items: start; }
.api-access-steps li > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: white; background: var(--docs-accent); font-weight: 750; }
.api-access-steps h3 { margin: 6px 0 3px; font-size: .95rem; }
.api-access-steps p { margin: 0; color: #6b788c; font-size: .82rem; line-height: 1.5; }

.api-doc-auth-where { margin: 16px 0 0; color: #65738a; font-size: .84rem; line-height: 1.6; }
.api-doc-auth-where a, .api-callout a { color: var(--docs-accent-strong); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.api-callout > span { min-width: 0; }

.api-doc-auth-summary { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.api-doc-auth-summary h2 { margin: 0 0 5px; font: 700 1.15rem Outfit, sans-serif; }
.api-doc-auth-summary p { margin: 0; color: #68768b; }
.api-doc-auth-summary > code { flex: 0 0 auto; padding: 11px 13px; border-radius: 8px; color: #2f5c88; background: #edf4fb; }
.api-doc-section .api-lifecycle-grid { margin-top: 17px; }
.api-doc-json { max-height: 440px; margin: 12px 0 0; padding: 18px; overflow: auto; border-radius: 10px; color: #dce8fa; background: #121c2f; font: .78rem/1.58 ui-monospace, monospace; }
.api-doc-json--large { max-height: 580px; }
.api-doc-next { display: grid; grid-template-columns: 1fr 20px; gap: 3px 16px; width: min(360px, 100%); margin: 34px 0 0 auto; padding: 17px 19px; border: 1px solid #cbd9e9; border-radius: 11px; color: var(--docs-accent-strong); text-decoration: none; background: white; }
.api-doc-next span { color: #8290a4; font-size: .7rem; text-transform: uppercase; }.api-doc-next strong { grid-column: 1; }.api-doc-next svg { grid-column: 2; grid-row: 1 / 3; width: 18px; align-self: center; }
.api-result-contract h3 { margin: 5px 0 7px; font-size: 1rem; }
.api-result-contract a { display: inline-block; margin-top: 11px; color: var(--docs-accent-strong); font-size: .8rem; font-weight: 650; text-decoration: none; }
.api-field-map { display: grid; margin-top: 17px; border: 1px solid #e1e7ef; border-radius: 10px; overflow: hidden; }
.api-field-map > div { display: grid; grid-template-columns: 180px 1fr; gap: 15px; padding: 13px 15px; }.api-field-map > div + div { border-top: 1px solid #e8edf3; }
.api-field-map span { color: #68768b; font-size: .84rem; }
.api-doc-standards { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px !important; }
.api-doc-standards a { padding: 6px 9px; border-radius: 7px; color: var(--docs-accent-strong); background: #edf4fb; font-size: .76rem; font-weight: 600; text-decoration: none; }
.api-doc-standards a:hover { color: #164f87; background: #e2eef9; }
.api-metric-usage-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.api-metric-usage-steps li { padding: 15px; border-radius: 10px; background: #f6f9fc; }.api-metric-usage-steps span { display: grid; width: 28px; height: 28px; margin-bottom: 9px; place-items: center; border-radius: 50%; color: white; background: var(--docs-accent); font-size: .75rem; font-weight: 700; }.api-metric-usage-steps p { margin: 0; color: #59687d; font-size: .82rem; line-height: 1.5; }
.api-metric-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.api-metric-toolbar label { display: flex; min-width: 280px; flex: 1; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid #dbe3ed; border-radius: 9px; }.api-metric-toolbar label svg { width: 16px; color: #8290a4; }.api-metric-toolbar input { width: 100%; border: 0; outline: 0; color: #24344d; background: transparent; }
.api-metric-toolbar > div { display: flex; gap: 5px; }.api-metric-toolbar button { padding: 8px 10px; border: 1px solid #dbe3ed; border-radius: 8px; color: #59687d; background: white; cursor: pointer; }.api-metric-toolbar button.is-active { color: var(--docs-accent-strong); border-color: #aacceb; background: #edf6ff; }.api-metric-toolbar button span { color: #8794a6; font-size: .7rem; }
.api-metric-category-filter { display: flex; align-items: center; gap: 7px; margin-bottom: 25px; padding: 12px; flex-wrap: wrap; border: 1px solid #e0e7ef; border-radius: 11px; background: #f8fafc; }
.api-metric-category-filter > span { margin: 0 5px 0 2px; color: #748196; font-size: .72rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.api-metric-category-filter button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid transparent; border-radius: 999px; color: #526077; background: white; box-shadow: 0 1px 2px rgba(24, 45, 75, .06); cursor: pointer; }
.api-metric-category-filter button:hover { border-color: #cbd8e7; }.api-metric-category-filter button.is-active { color: var(--docs-accent-strong); border-color: #a9cbea; background: #eaf4fe; }
.api-metric-category-filter button b { color: #8794a6; font-size: .68rem; }
.api-category-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #7c8ca4; }
.api-category-dot--document { background: #3976c5; }.api-category-dot--readability { background: #db5a7b; }.api-category-dot--lexical { background: var(--color-lexical); }.api-category-dot--morphosyntax { background: var(--color-morphosyntax); }.api-category-dot--discourse { background: var(--color-discourse); }
.api-metric-groups { display: grid; gap: 28px; }
.api-metric-group > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; padding: 0 3px; }
.api-metric-group > header > div { display: flex; align-items: center; gap: 9px; }.api-metric-group > header h2 { margin: 0; color: #24344d; font: 700 1.05rem Outfit, sans-serif; }
.api-metric-group > header > span { color: #8491a4; font-size: .72rem; }.api-metric-group > header > span b { color: #526077; }
.api-metric-list { display: grid; border: 1px solid #e0e7ef; border-radius: 11px; overflow: hidden; }
.api-metric-row { display: grid; grid-template-columns: 120px 1fr 70px 18px; gap: 14px; align-items: center; padding: 17px; color: inherit; text-decoration: none; background: white; }.api-metric-row + .api-metric-row { border-top: 1px solid #e8edf3; }.api-metric-row:hover { background: #f8fbfe; }.api-metric-row > svg { width: 17px; color: #93a0b1; }
.api-metric-row h2 { margin: 0 0 4px; font: 700 1rem Outfit, sans-serif; }.api-metric-row p { margin: 7px 0 0; color: #68768b; font-size: .8rem; line-height: 1.45; }.api-metric-row div > code { color: #63738a; font-size: .7rem; }
.api-metric-kind { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 999px; color: #285f91; background: #e9f3fc; font-size: .65rem; font-weight: 750; text-transform: uppercase; }.api-metric-kind--rule { color: #6f4a12; background: #fff1d7; }
.api-metric-status { color: #157352; font-size: .7rem; font-weight: 700; }.api-metric-status.is-inactive { color: #9b3a3a; }
.api-doc-breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 22px; color: #788699; font-size: .78rem; }.api-doc-breadcrumb a { color: var(--docs-accent); text-decoration: none; }.api-doc-breadcrumb svg { width: 14px; }
.api-metric-detail-badges { display: flex; gap: 7px; margin-bottom: 13px; }
.api-metric-use-card > div { display: flex; gap: 10px; align-items: center; margin-top: 15px; padding: 13px; border-radius: 9px; background: #f1f6fb; }.api-metric-use-card > div span:first-child { color: #788699; font-size: .72rem; text-transform: uppercase; }.api-metric-use-card > div span:last-child { color: #52647a; font-size: .78rem; }
.api-metric-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 0; overflow: hidden; background: #e1e7ef; }.api-metric-detail-grid article { padding: 23px; background: white; }.api-metric-detail-grid h2 { margin: 0 0 9px; font: 700 1.05rem Outfit, sans-serif; }.api-metric-detail-grid p { margin: 0; color: #65738a; line-height: 1.62; font-size: .87rem; }
.api-metric-detail-grid dl { display: grid; gap: 8px; }.api-metric-detail-grid dl div { display: grid; grid-template-columns: 145px 1fr; gap: 8px; }.api-metric-detail-grid dt { color: #788699; font-size: .75rem; }.api-metric-detail-grid dd { display: flex; gap: 5px; flex-wrap: wrap; margin: 0; }
.api-metric-json-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.api-metric-json-link h2 { font-size: 1rem; }.api-metric-json-link p { margin: 0; }
.api-endpoint-index { display: grid; margin-bottom: 24px; border: 1px solid #dfe6ef; border-radius: 12px; overflow: hidden; background: white; }.api-endpoint-index a { display: grid; grid-template-columns: 50px 1.1fr 1fr; gap: 12px; align-items: center; padding: 13px 15px; color: inherit; text-decoration: none; }.api-endpoint-index a + a { border-top: 1px solid #e8edf3; }.api-endpoint-index a:hover { background: #f7fafc; }.api-endpoint-index a > span:last-child { color: #6c798d; font-size: .78rem; }.api-endpoint-index code { font-size: .76rem; }
.api-schema-list { padding: 24px; }
/* Un `1fr` es `minmax(auto, 1fr)`: su mínimo es la anchura de contenido mínima,
   y un token como `/v1/reports/{report_id}/events` no tiene dónde partirse. Ahí
   nacía el desbordamiento de estas páginas —invisible, porque el body lleva
   `overflow-x: clip`—, así que todo carril que aloje código va a `minmax(0, 1fr)`
   y los `<code>` en línea pueden partirse. `overflow-wrap: anywhere` (y no
   `break-word`) es lo que además reduce el mínimo del carril. */
@media (max-width: 800px) {
  .openapi-reference-page { grid-template-columns: minmax(0, 1fr); }
  .openapi-sidebar { position: static; width: auto; height: auto; border-right: 0; border-bottom: 1px solid #dfe6ef; }
  .openapi-sidebar nav { display: none; }
  .openapi-content { width: calc(100% - 28px); padding-top: 28px; }
  .openapi-operation, .openapi-schemas { padding: 20px; }
  .openapi-table > div, .openapi-responses > div { grid-template-columns: 80px minmax(0, 1fr); }
  .openapi-schemas summary { grid-template-columns: minmax(0, 1fr) 18px; }
  .openapi-schemas summary span { grid-column: 1; }
  .api-doc-choice-grid, .api-metric-usage-steps { grid-template-columns: minmax(0, 1fr); }
  .api-doc-auth-summary, .api-metric-toolbar, .api-metric-json-link { align-items: flex-start; flex-direction: column; }
  .api-metric-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .api-metric-row { grid-template-columns: minmax(0, 1fr) 70px 18px; }
  .api-metric-row > .api-metric-kind { grid-column: 1 / -1; }
  .api-metric-toolbar label { width: 100%; min-width: 0; }
  .api-metric-toolbar > div, .api-metric-category-filter { flex-wrap: wrap; }
  .api-metric-category-filter > span { width: 100%; }
  .api-field-map > div { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .api-doc-kicker { font-size: .75rem; }
  .openapi-back { min-height: 40px; }
  /* El índice de endpoints es el peor caso: método, ruta y resumen en tres
     carriles no caben, y la ruta es el token que no se parte. Se apila. */
  .api-endpoint-index a { grid-template-columns: 50px minmax(0, 1fr); gap: 4px 12px; }
  .api-endpoint-index a > code { grid-column: 2; }
  .api-endpoint-index a > span:last-child { grid-column: 1 / -1; }
  .api-metric-detail-grid dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Los `<code>` en línea de la prosa y de las tablas llevan rutas, cabeceras y
   expresiones sin espacios. Sin punto de corte fijan el mínimo de su carril. */
.api-field-map code, .api-endpoint-index code, .openapi-table code,
.api-doc-section p code, .api-access-steps code, .api-metric-use-card code,
.openapi-operation > header code, .api-doc-auth-summary > code {
  overflow-wrap: anywhere;
}

