/* ArquiReto · Vehículos */
.arx-app {
  /* ===== Paleta El Rincón del Arqui (editable) ===== */
  --mint: #82d3a1;      /* barra superior del sitio */
  --mint-d: #2f8f66;    /* texto/acentos sobre blanco */
  --teal: #74e6c9;      /* círculos destacados */
  --card: #f8f5f5;     /* tarjetas */
  --wash: #e2eae5;      /* trama de muros */
  --floor: #edf3ef;     /* relleno verde-gris de los ambientes */
  --paper: #ffffff; --paper2: #f2f8f4; --ink: #111; --mute: #5c7a6b; --line: #d2e3d8;
  --cad: #22a653; --cad-d: #167a3c; --warn: #b7791f; --bad: #b3402a; --ok: #1f7a43;
  /* Tipografías: por defecto heredan las del tema; puedes forzarlas con --arq-font, --arq-font-head, --arq-font-brand */
  --ui: ui-sans-serif, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  position: relative; box-sizing: border-box; width: 100%; max-width: 1240px; margin: 1.5em auto; padding: 0 16px 16px;
  background: var(--paper2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: var(--ink);
  font-size: 15px; line-height: 1.5; font-family: var(--arq-font, inherit);
}
.arx-app h3, .arx-app h4, .arx-brand small { font-family: var(--arq-font-head, var(--arq-font, inherit)); }
.arx-app *, .arx-app *::before, .arx-app *::after { box-sizing: border-box; }
.arx-app button { font: inherit; color: inherit; cursor: pointer; }
.arx-app button:focus-visible, .arx-app summary:focus-visible, .arx-app .arx-stage:focus-visible { outline: 2px solid var(--cad); outline-offset: 2px; }

/* cabecera */
.arx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 -16px 14px; padding: 12px 18px; background: var(--mint); color: #0f3a28; }
.arx-brand { display: flex; flex-direction: column; line-height: 1.1; margin-right: auto; }
.arx-brand b { font: italic 400 25px/1.1 var(--arq-font-brand, "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif); letter-spacing: .01em; }
.arx-brand small { color: #1d5a40; font-size: 12.5px; }
.arx-tabs { display: inline-flex; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.55); padding: 3px; gap: 2px; }
.arx-tabs button { border: 0; background: transparent; padding: 6px 18px; font-weight: 700; font-size: 14px; border-radius: 999px; color: #0f3a28; }
.arx-tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.arx-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.arx-steps button { display: flex; align-items: center; gap: 6px; border: 0; background: rgba(255,255,255,.55); border-radius: 999px; padding: 4px 12px 4px 5px; font-size: 13.5px; color: #0f3a28; }
.arx-steps button b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; font: 700 11.5px var(--mono); }
.arx-steps button[aria-current="step"] { background: #fff; box-shadow: 0 0 0 2px #0f3a28 inset; }
.arx-steps button.done b { background: var(--cad-d); color: #fff; }
.arx-steps button:disabled { opacity: .55; cursor: not-allowed; }

/* enunciado */
.arx-brief { background: var(--card); border-radius: 18px; padding: 12px 18px 12px 66px; margin-bottom: 12px; position: relative; }
.arx-brief::before { content: ''; position: absolute; left: 16px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--teal); box-shadow: inset 0 0 0 7px var(--teal), inset 0 0 0 10px #fff; }
.arx-brief h3 { margin: 0 0 2px; font-size: 17px; font-weight: 700; }
.arx-brief p { margin: 0; max-width: 96ch; }
.arx-brief .goal { color: var(--mute); font-size: 13.5px; margin-top: 3px; }
.arx-brief details { margin-top: 5px; font-size: 13.5px; }
.arx-brief summary { cursor: pointer; color: var(--mint-d); font-weight: 700; }
.arx-brief ul { margin: 4px 0 0; padding-left: 18px; }

/* zona de trabajo */
.arx-main { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 12px; align-items: start; }
.arx-lib { background: var(--card); border-radius: 18px; padding: 12px; }
.arx-lib h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.arx-libgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.arx-li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 4px; border: 1px solid transparent; border-radius: 12px; background: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.arx-li:hover { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint); }
.arx-li .th { display: block; height: 62px; width: 100%; }
.arx-li .th svg { width: 100%; height: 100%; }
.arx-li span.nm { font-size: 11.5px; line-height: 1.15; text-align: center; color: var(--ink); }
.arx-libhint { margin: 8px 0 0; font-size: 12px; color: var(--mute); line-height: 1.35; }
.arx-ghost { position: fixed; z-index: 99999; pointer-events: none; width: 64px; height: 80px; transform: translate(-50%, -50%); opacity: .85; }
.arx-ghost svg { width: 100%; height: 100%; }

.arx-stagewrap { min-width: 0; }
.arx-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; min-height: 30px; }
.arx-seg { display: inline-flex; border-radius: 999px; overflow: hidden; background: var(--card); padding: 2px; }
.arx-seg button { border: 0; background: transparent; padding: 4px 12px; font-size: 13px; border-radius: 999px; }
.arx-seg button[aria-pressed="true"] { background: var(--mint); color: #0f3a28; font-weight: 700; }
.arx-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); }
.arx-stage { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 2px 14px rgba(47,143,102,.10); }
.arx-svg { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.arx-svg-fig { display: block; width: 100%; height: 100%; }
.arx-ctx { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; padding: 5px 7px; background: rgba(255,255,255,.97); border: 1px solid var(--mint); border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.12); max-width: calc(100% - 16px); }
.arx-ctx[hidden] { display: none; }
.arx-ctx button { min-width: 34px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0 8px; font-size: 14px; }
.arx-ctx button:hover { border-color: var(--mint-d); }
.arx-ctx button.del { color: var(--bad); }
.arx-ctx label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 0 6px; }
.arx-ctx input[type=range] { width: 90px; accent-color: var(--cad); }
.arx-ctx output { font: 12px var(--mono); min-width: 38px; }
.arx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.arx-btn { border: 1px solid var(--mint-d); background: #fff; border-radius: 999px; padding: 9px 20px; font-weight: 700; font-size: 14px; color: #0f3a28; }
.arx-btn:hover:not(:disabled) { background: var(--card); }
.arx-btn.pri { background: var(--mint); border-color: var(--mint); color: #0f3a28; }
.arx-btn.pri:hover:not(:disabled) { background: #72c993; }
.arx-btn.cad { background: var(--mint-d); border-color: var(--mint-d); color: #fff; }
.arx-btn:disabled { opacity: .45; cursor: not-allowed; }
.arx-note { align-self: center; font-size: 12.5px; color: var(--mute); }

/* retroalimentación */
.arx-feedback { margin-top: 12px; background: var(--card); border-radius: 18px; padding: 16px 20px; }
.arx-feedback h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.arx-feedback .empty { margin: 0; color: var(--mute); }
.arx-score { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.arx-score b { font: 700 22px var(--mono); min-width: 64px; }
.arx-bar { flex: 1; max-width: 340px; height: 8px; background: #e4eee8; border-radius: 4px; overflow: hidden; }
.arx-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--mint-d)); }
.arx-score .lv { font-weight: 600; }
.arx-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.arx-items li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 8px 10px; border-radius: 14px; background: #fff; border: 1px solid transparent; }
.arx-items .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 13px var(--ui); }
.arx-items .ok .ic { background: var(--ok); } .arx-items .warn .ic { background: var(--warn); } .arx-items .bad .ic { background: var(--bad); }
.arx-items li.bad { border-color: #e1b3a8; } .arx-items li.warn { border-color: #e6d1a2; }
.arx-items strong { display: block; font-size: 14px; }
.arx-items p { margin: 1px 0 0; font-size: 14px; }
.arx-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; margin-top: 12px; }
.arx-more details { border-radius: 14px; padding: 9px 14px; background: #fff; }
.arx-more summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.arx-more ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.arx-more p { margin: 6px 0 0; font-size: 13.5px; }
.arx-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.arx-cmp figure { margin: 0; border-radius: 14px; overflow: hidden; background: #fff; }
.arx-cmp figcaption { padding: 8px 10px; font-size: 13px; }
.arx-cmp figcaption b { display: block; }
.arx-cmp .t-bad b { color: var(--bad); } .arx-cmp .t-good b { color: var(--ok); }
.arx-next { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.arx-ok-msg { font-weight: 700; color: var(--mint-d); }
.arx-noscript { padding: 14px; background: #fff; border: 1px solid var(--line); }

/* ----- dibujo (SVG) ----- */
.arx-svg * { vector-effect: non-scaling-stroke; }
.arx-svg .paper { fill: var(--paper); }
.arx-svg .w { stroke: #1d1f1c; stroke-width: 1.7px; stroke-linejoin: miter; }
.arx-svg .w2 { stroke: #1d1f1c; stroke-width: 2.4px; }
.arx-svg .wf { stroke: none; }
.arx-svg .op { fill: var(--floor); stroke: none; }
.arx-svg .m { fill: #fff; stroke: #1a1c1a; stroke-width: 1.1px; stroke-linejoin: round; }
.arx-svg .md { fill: none; stroke: #6f726a; stroke-width: .65px; stroke-linejoin: round; }
.arx-svg .rug { fill: none; stroke: #a9a597; stroke-width: .7px; stroke-dasharray: 6 4; }
.arx-svg .g { stroke: var(--cad); stroke-width: .8px; stroke-dasharray: 9 5; fill: none; }
.arx-svg .g2 { stroke: #9aa398; stroke-width: .6px; fill: none; }
.arx-svg .gs { fill: none; stroke: var(--cad); stroke-width: 1.2px; }
.arx-svg .sw { fill: none; stroke: #1d1f1c; stroke-width: .75px; }
.arx-svg .dim { stroke: #4a4c47; stroke-width: .7px; fill: none; }
.arx-svg .dimx { stroke: #8a8d85; stroke-width: .55px; fill: none; }
.arx-svg text { font-family: inherit; fill: #3d4a43; }
.arx-svg .dtx { font-size: calc(var(--k, 1) * 11px); font-family: ui-monospace, Menlo, Consolas, monospace; }
.arx-svg .lbl { font-size: calc(var(--k, 1) * 13px); letter-spacing: calc(var(--k, 1) * 2.4px); fill: #80837a; }
.arx-svg .lbl2 { font-size: calc(var(--k, 1) * 10px); fill: #80837a; }
.arx-svg .ttl { font-size: calc(var(--k, 1) * 13px); font-weight: 700; letter-spacing: calc(var(--k, 1) * .6px); fill: #1d1f1c; }
.arx-svg .sub { font-size: calc(var(--k, 1) * 11px); fill: #6c6f68; }
.arx-svg .fb { fill: #fff; stroke: #1d1f1c; stroke-width: .8px; stroke-linejoin: round; }
.arx-svg .ff { fill: #fff; stroke: #8b8e85; stroke-width: .7px; stroke-linejoin: round; }
.arx-svg .fd { fill: none; stroke: #1d1f1c; stroke-width: .55px; }
.arx-svg .fh { fill: none; stroke: #1d1f1c; stroke-width: .7px; }
.arx-svg .fig { cursor: grab; }
.arx-svg .fig .hit { fill: #fff; fill-opacity: 0; stroke: none; }
.arx-svg .fig.ghost { opacity: .55; pointer-events: none; }
.arx-svg .fig.ghost .fb, .arx-svg .fig.ghost .ff { stroke: var(--cad-d); fill: rgba(31,157,67,.12); }
.arx-svg .fig.ghost .fd, .arx-svg .fig.ghost .fh { stroke: var(--cad-d); }
.arx-svg .hint { fill: rgba(31,157,67,.05); stroke: var(--cad); stroke-width: .8px; stroke-dasharray: 5 4; }
.arx-svg .hint.no { fill: rgba(179,64,42,.05); stroke: var(--bad); }
.arx-svg .hintt { font-size: calc(var(--k, 1) * 11px); fill: var(--cad-d); font-style: italic; }
.arx-svg .room { fill: var(--floor); stroke: none; }
.arx-svg .hintt.no { fill: var(--bad); }
.arx-svg .gpath { fill: none; stroke: var(--cad); stroke-width: 1.4px; stroke-dasharray: 8 6; }
.arx-svg .mk { fill: none; stroke-width: 1.6px; stroke-dasharray: 5 3; }
.arx-svg .mk.warn { stroke: var(--warn); fill: rgba(183,121,31,.1); }
.arx-svg .mk.bad { stroke: var(--bad); fill: rgba(179,64,42,.1); }
.arx-svg .mk.ok { stroke: var(--ok); fill: rgba(31,122,67,.08); }
.arx-svg .selbox { fill: none; stroke: var(--cad); stroke-width: 1px; stroke-dasharray: 4 3; pointer-events: none; }
.arx-svg .rotline { stroke: var(--cad); stroke-width: 1px; }
.arx-svg .roth { fill: #fff; stroke: var(--cad); stroke-width: 1.4px; cursor: grab; }
.arx-svg .badge circle { fill: var(--ink); stroke: none; }
.arx-svg .badge text { fill: #fff; font: 700 calc(var(--k, 1) * 11px) var(--ui); text-anchor: middle; }
.arx-mini .fig { cursor: default; }
.arx-cmp .arx-svg { border-bottom: 1px solid var(--line); }

@media (max-width: 860px) {
  .arx-main { grid-template-columns: 1fr; }
  .arx-lib { padding: 8px; }
  .arx-libgrid { grid-template-columns: repeat(6, minmax(66px, 1fr)); overflow-x: auto; }
  .arx-libhint { display: none; }
  .arx-steps button span { display: none; }
  .arx-cmp { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .arx-libgrid { grid-template-columns: repeat(6, 74px); } .arx-app { padding: 10px; } }
@media (prefers-reduced-motion: no-preference) { .arx-bar i { transition: width .5s ease; } }

/* ----- específicos de vehículos ----- */
.arx-svg .room { fill: #eef4ef; }
.arx-svg .slab { fill: #eceee9; stroke: none; }
.arx-svg .slab2 { fill: #e3ebe6; stroke: #1d1f1c; stroke-width: 1px; }
.arx-svg .bldg { fill: #f3f5f2; stroke: #8a8d85; stroke-width: .8px; }
.arx-svg .zone { fill: rgba(34,166,83,.05); stroke: var(--cad); stroke-width: .9px; stroke-dasharray: 8 5; }
.arx-svg .road { fill: #dfe3dc; stroke: none; }
.arx-svg .curb { fill: none; stroke: #1d1f1c; stroke-width: 1.2px; }
.arx-svg .cl { fill: none; stroke: #8a8d85; stroke-width: .9px; stroke-dasharray: 14 10; }
.arx-svg .sl { fill: rgba(255,255,255,.35); stroke: #1d1f1c; stroke-width: .9px; stroke-linejoin: round; }
.arx-svg .acc { fill: rgba(60,120,200,.14); stroke: #3d6ca8; stroke-width: .8px; stroke-dasharray: 5 3; }
.arx-svg .zn { fill: rgba(34,166,83,.12); stroke: var(--cad); stroke-width: .6px; stroke-dasharray: 4 3; }
.arx-svg .zg { display: none; }
.arx-g .zg { display: inline; }
.arx-svg-fig .zg { display: none !important; }
.arx-svg .vb { fill: #fff; stroke: #1d1f1c; stroke-width: .9px; stroke-linejoin: round; }
.arx-svg .vw { fill: #3a3d39; stroke: none; }
.arx-svg .vw2 { fill: #fff; stroke: #1d1f1c; stroke-width: 1px; }
.arx-svg .vd { fill: none; stroke: #5b5e57; stroke-width: .6px; }
.arx-svg .vt2 { fill: none; stroke: #1d1f1c; stroke-width: 1.2px; }
.arx-svg .vt3 { fill: none; stroke: #1d1f1c; stroke-width: 1.3px; stroke-linecap: round; stroke-linejoin: round; }
.arx-svg .env { fill: none; stroke: #2f6fb0; stroke-width: 1.3px; stroke-dasharray: 10 6; }
.arx-svg .trail { opacity: .35; }
.arx-svg .trail.end { opacity: .8; }
.arx-svg .trail .vb { fill: rgba(47,111,176,.15); stroke: #2f6fb0; }
.arx-svg .rampl { fill: none; stroke: #1d1f1c; stroke-width: 2.4px; }
.arx-svg .soil2 { fill: #e6dac4; stroke: none; }
.arx-svg .testv .vb { fill: rgba(47,111,176,.12); stroke: #2f6fb0; }
.arx-svg .testv.hit .vb { fill: rgba(179,64,42,.18); stroke: var(--bad); }
.arx-svg .beam { fill: #cfd5cf; stroke: #1d1f1c; stroke-width: 1.2px; }
.arx-svg .pv { fill: #e9ece6; stroke: #1d1f1c; stroke-width: .9px; }
.arx-svg .cic { fill: #bfe3cc; stroke: #1d1f1c; stroke-width: .8px; }
.arx-svg .grn { fill: #cfe6c3; stroke: #1d1f1c; stroke-width: .8px; }
.arx-svg .asf { fill: #d6d9d2; stroke: #1d1f1c; stroke-width: .8px; }
.arx-svg .bol { fill: #fff; stroke: #1d1f1c; stroke-width: .9px; }
.arx-svg .rkl { fill: none; stroke: #1d1f1c; stroke-width: 1.4px; }
.arx-svg .bkv { fill: #fff; stroke: #1d1f1c; stroke-width: .9px; }
.arx-svg .vg { fill: rgba(34,166,83,.13); stroke: #1d3a2a; stroke-width: .9px; }
.arx-svg .fence { stroke: #1d1f1c; stroke-width: 1.4px; stroke-dasharray: 10 5; }
.arx-svg .lim { stroke: #8a8d85; stroke-width: .8px; stroke-dasharray: 14 6; fill: none; }
.arx-svg .gpath { fill: none; stroke: var(--cad); stroke-width: 1.4px; stroke-dasharray: 8 6; }
.arx-svg .hint { fill: rgba(34,166,83,.05); stroke: var(--cad); stroke-width: .8px; stroke-dasharray: 5 4; }
.arx-svg .hintt { font-size: calc(var(--k, 1) * 11px); fill: var(--cad-d); font-style: italic; }
.arx-svg .w2 { stroke: #1d1f1c; stroke-width: 2.4px; }
.arx-svg .rotc { fill: var(--cad); stroke: none; }
.arx-items li.info .ic { background: var(--mint-d); }
.arx-items li.info { background: #f0f8f3; border-color: #cfe6d9; }
.arx-ctx { flex-wrap: wrap; max-width: calc(100% - 16px); }
.arx-ctx .pp { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 0 6px; }
.arx-ctx .pp input[type=range] { width: 100px; accent-color: var(--cad); }
.arx-ctx .pp output { font: 12px var(--mono); min-width: 52px; }
.arx-ctx select { height: 32px; border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; background: #fff; font-size: 13px; }
.arx-ctx .angs { display: inline-flex; border-radius: 999px; overflow: hidden; background: var(--card); padding: 2px; }
.arx-ctx .angs button { min-width: 0; height: 28px; border: 0; background: transparent; padding: 0 9px; }
.arx-ctx .angs button[aria-pressed="true"] { background: var(--mint); font-weight: 700; }
.arx-testbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 12px; margin-bottom: 8px; background: var(--card); border-radius: 14px; font-size: 13px; }
.arx-testbar[hidden] { display: none; }
.arx-testbar .arx-seg { background: #fff; flex-wrap: wrap; }
.arx-matrix { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.arx-matrix th, .arx-matrix td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.arx-matrix .st { font-weight: 700; white-space: nowrap; }
.arx-matrix .ok { color: var(--ok); } .arx-matrix .warn { color: var(--warn); } .arx-matrix .bad { color: var(--bad); }
.arx-mxbox { margin-top: 12px; padding: 10px 14px; background: #fff; border-radius: 14px; }
.arx-mxbox h4 { margin: 0; font-size: 14px; font-family: var(--arq-font-head, var(--arq-font, inherit)); }
