/* The five pages of Documentación (/mapa/, /suscripciones/, /herramientas/, /llaves/, /ligas/), on top of editor.css and account.css (chips and tables). */
.pending { color: var(--yellow); font-style: italic; }
.stamp { margin-top: 2px; }
.doc-section { margin-top: 18px; }
.doc-section > h2 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.doc-section > h2 .n { color: var(--muted); font-size: .85rem; font-weight: 400; }
.doc-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.doc-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; overflow-wrap: anywhere; }
.doc-item h3 { margin: 0 0 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.doc-item.soon { border-color: rgba(242, 201, 76, .7); box-shadow: 0 0 0 1px rgba(242, 201, 76, .25); }
.doc-item.urgent { border-color: rgba(240, 57, 47, .8); box-shadow: 0 0 0 1px rgba(240, 57, 47, .35); }
.doc-item.dropped { opacity: .85; border-style: dashed; }
.facts { margin: 8px 0 0; display: grid; gap: 6px; }
.fact { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 8px; }
.fact dt { color: var(--muted); font-size: .82rem; }
.fact dd { margin: 0; font-size: .92rem; }
@media (max-width: 480px) { .fact { grid-template-columns: minmax(0, 1fr); gap: 0; } }
code, .name { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; overflow-wrap: anywhere; }
.chip.ok { color: var(--green); border-color: rgba(34, 177, 76, .55); }
.chip.info { color: #8fc0ff; border-color: rgba(42, 134, 255, .7); }
.chip.name { color: var(--text); }

/* the alert at the top of Suscripciones */
.alert { margin-top: 16px; border: 1px solid rgba(240, 57, 47, .7); background: rgba(240, 57, 47, .08); border-radius: var(--radius); padding: 12px 14px; }
.alert h2 { margin: 0 0 6px; font-size: 1rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert li { margin: 4px 0; }

/* Mapa: the diagram and the ficha of the repo picked on it */
.map-wrap { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.map-svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.map-svg .band { font: 600 13px system-ui, sans-serif; fill: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.map-svg .node rect { fill: #17213f; stroke: var(--line); stroke-width: 1.2; }
.map-svg .node.g-secciones rect { fill: #142446; }
.map-svg .node.g-servicios rect { fill: #1f1c3f; }
.map-svg .node.g-productos rect { fill: #122a2c; }
.map-svg .node { cursor: pointer; outline: none; }
.map-svg .node:hover rect, .map-svg .node:focus-visible rect { stroke: var(--blue); stroke-width: 2; }
.map-svg .node.on rect { stroke: var(--text); stroke-width: 2.4; }
.map-svg .node.no-repo rect { stroke-dasharray: 4 3; }
.map-svg .node .t { font: 600 13px system-ui, sans-serif; fill: var(--text); }
.map-svg .node .d { font: 11px system-ui, sans-serif; fill: var(--muted); }
.map-svg .node .b { font: 600 10px ui-monospace, Consolas, monospace; fill: #8fc0ff; }
.map-svg .edges { pointer-events: none; }
.map-svg .edge { fill: none; stroke: #8b96b8; stroke-width: 1.3; opacity: .5; marker-end: url(#m-any); }
.map-svg .edge.out { stroke: var(--blue); opacity: 1; stroke-width: 2.2; marker-end: url(#m-out); }
.map-svg .edge.in { stroke: var(--green); opacity: 1; stroke-width: 2.2; marker-end: url(#m-in); }
.map-svg .m-any { fill: #8b96b8; }
.map-svg .m-out { fill: var(--blue); }
.map-svg .m-in { fill: var(--green); }
.map-svg.picked .edge:not(.out):not(.in) { opacity: .06; }
.map-svg.picked .node:not(.on):not(.near) { opacity: .45; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 4px 2px; font-size: .82rem; color: var(--muted); }
.legend .sw { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.legend .sw.out { background: var(--blue); }
.legend .sw.in { background: var(--green); }
.legend .sw.dash { background: none; border-top: 2px dashed var(--muted); height: 0; }
.ficha-card { margin-top: 14px; }
.ficha-card .chips-line { display: flex; flex-wrap: wrap; gap: 2px; }
.ficha-card ul.plain { margin: 0; padding-left: 1.1rem; }
.ficha-card ul.plain li { margin: 2px 0; }

/* Ligas */
.host { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95rem; overflow-wrap: anywhere; }
.live { margin-top: 6px; font-size: .84rem; }
.live.bad { color: var(--red); }
.live.warn { color: var(--yellow); }
.live.good { color: var(--green); }
.filters { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .88rem; cursor: pointer; min-height: 36px; }
.filters button[aria-pressed=true] { background: var(--text); color: var(--bg); border-color: var(--text); }
/* Ligas, the inventory: search, where a host redirects and its folded routes */
.search-row { margin-top: 12px; display: grid; gap: 4px; max-width: 32rem; }
.search-row label { color: var(--muted); font-size: .85rem; }
.search-row input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; min-height: 40px; width: 100%; min-width: 0; }
.redirect { margin: 2px 0 6px; font-size: .9rem; overflow-wrap: anywhere; }
.routes { margin-top: 8px; font-size: .9rem; }
.routes summary { cursor: pointer; color: var(--muted); padding: 5px 0; }
.routes summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.routes ul { margin: 6px 0 0; padding-left: 1.1rem; display: grid; gap: 3px; }
.cleanup { margin: 8px 0 0; padding-left: 1.3rem; }
.cleanup li { margin: 6px 0; }

/* Suscripciones: the editor */
.sub-form { display: grid; gap: 2px; }
.sub-form h3 { margin: 0 0 4px; }
.sub-form .grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0 12px; }
.sub-form input[type=date], .sub-form input[type=url] { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; min-width: 0; color-scheme: dark; }
.sub-form .actions-row { margin-top: 10px; }
.doc-item.editing, .card.editing { border-color: var(--blue); }
.item-actions { margin-top: 10px; justify-content: flex-end; }
.item-actions button { min-height: 36px; }
#add { min-height: 40px; }
body.busy { cursor: progress; }
body.busy #list, body.busy #log { opacity: .7; }
/* every page of Documentación: its edit bar and the shared form (sections/docs-editor.js) */
.edit-bar { margin-top: 10px; }
.sub-form label.wide { grid-column: 1 / -1; }
.sub-form textarea { font-family: inherit; }
.sub-form .due-pair { display: contents; }
.sub-form input:disabled { opacity: .7; }
.ficha-card .sub-form h3 { margin-top: 0; }
.sub-form .field-note { display: block; font-weight: 400; font-size: .78rem; color: var(--yellow); margin-top: 2px; }
