/* Comparison and process maps (2026-10-28): a matrix and a timeline that reuse the map's
   floating tools. Hierarchy maps keep the Mermaid canvas styled in interior.css. */
html.relieve .app-shell:not(.anonymous) #view .study-map-layout { --m-amber: rgb(232 201 138 / .5); display: flex; flex-direction: column; min-height: 340px }
html.relieve .app-shell:not(.anonymous) #view .study-map-layout > .study-map-body { flex: 1; min-height: 0; position: relative }
html.relieve .app-shell:not(.anonymous) #view .study-map-layout .map-layout-canvas {
  box-sizing: border-box; height: clamp(420px, 74dvh, 860px); overflow: auto; overscroll-behavior: contain; container-type: inline-size;
  padding: 4px 18px 22px; border-style: solid; border-color: transparent; border-width: var(--m-top) 0 0; border-radius: 22px;
  background: radial-gradient(rgb(247 243 234 / .07) 1px, transparent 1.4px) 0 0 / 22px 22px, radial-gradient(ellipse at 70% 0%, rgb(139 30 63 / .2), transparent 60%), #101923;
  color: var(--m-text); scrollbar-width: thin;
}
/* In the reader the frame is stretched by the desk: the canvas fills it instead of leaving a band. */
html.relieve .app-shell:not(.anonymous) #view .is-map-reader > .study-map-layout > .study-map-body { display: flex; flex-direction: column }
html.relieve .app-shell:not(.anonymous) #view .is-map-reader > .study-map-layout .map-layout-canvas { flex: 1 1 auto; height: auto; min-height: 340px; max-height: none }
html.relieve .app-shell:not(.anonymous) #view .study-map-layout .map-layout-summary { max-width: 70ch; margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--m-soft) }
html.relieve .app-shell:not(.anonymous) #view .study-map-layout .map-layout-kicker { margin: 0; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--m-rose) }
html.relieve .app-shell:not(.anonymous) #view .study-map-layout :is(h3, h4) { margin: 0; color: #f7f3ea }
html.relieve .app-shell:not(.anonymous) #view .study-map-layout .map-layout-refs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px }
html.relieve .app-shell:not(.anonymous) #view .study-map-layout .map-layout-ref {
  display: inline-flex; align-items: center; min-height: 26px; margin: 0; padding: 2px 9px; border: 1px solid var(--m-line); border-radius: 999px;
  background: transparent; box-shadow: none; transform: none; color: var(--m-rose); font: 500 11.5px/1.3 var(--font-mono); text-align: left;
}
html.relieve .app-shell:not(.anonymous) #view .study-map-layout .map-layout-ref:hover { border-color: rgb(217 152 174 / .45); background: rgb(139 30 63 / .16); transform: none }

/* Comparación: rows share one column grid through subgrid, so every cell of a criterion aligns. */
html.relieve .app-shell:not(.anonymous) #view .map-compare {
  display: grid; grid-template-columns: minmax(140px, .7fr) repeat(var(--terms, 2), minmax(200px, 1fr)); min-width: max-content;
  border: 1px solid var(--m-line); border-radius: 16px; background: rgb(13 21 30 / .72); overflow: hidden;
}
@supports (grid-template-columns: subgrid) { html.relieve .app-shell:not(.anonymous) #view .map-compare { min-width: 0 } }
html.relieve .app-shell:not(.anonymous) #view .map-compare-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; border-top: 1px solid var(--m-line) }
html.relieve .app-shell:not(.anonymous) #view .map-compare-row.is-head { border-top: 0; background: rgb(139 30 63 / .16) }
html.relieve .app-shell:not(.anonymous) #view .map-compare-row > * { min-width: 0; padding: 12px 14px }
html.relieve .app-shell:not(.anonymous) #view .map-compare-row > * + * { border-left: 1px solid var(--m-line) }
html.relieve .app-shell:not(.anonymous) #view .map-compare-term h3 { font-family: var(--font-display); font-weight: 420; font-size: 19px; line-height: 1.2; letter-spacing: -.01em }
html.relieve .app-shell:not(.anonymous) #view .map-compare-corner { display: flex; align-items: end }
html.relieve .app-shell:not(.anonymous) #view .map-compare-criterion { font-size: 13px; font-weight: 650; line-height: 1.4; color: #f7f3ea }
html.relieve .app-shell:not(.anonymous) #view .map-compare-row.is-definition { background: rgb(255 255 255 / .02) }
html.relieve .app-shell:not(.anonymous) #view .map-compare-row.is-definition .map-compare-criterion { color: var(--m-soft); font-weight: 600 }
html.relieve .app-shell:not(.anonymous) #view .map-compare-cell p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--m-text) }
html.relieve .app-shell:not(.anonymous) #view .map-compare-cell-term { display: none }
html.relieve .app-shell:not(.anonymous) #view .map-compare-row:not(.is-head):hover > * { background: rgb(255 255 255 / .025) }
html.relieve .app-shell:not(.anonymous) #view :is(.map-compare-common, .map-compare-key) { margin-top: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--m-line); background: rgb(13 21 30 / .72) }
html.relieve .app-shell:not(.anonymous) #view :is(.map-compare-common, .map-compare-key) h3 { margin-bottom: 8px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--m-soft) }
html.relieve .app-shell:not(.anonymous) #view .map-compare-common ul { display: grid; gap: 8px; margin: 0; padding: 0 0 0 18px }
html.relieve .app-shell:not(.anonymous) #view .map-compare-common li p,
html.relieve .app-shell:not(.anonymous) #view .map-compare-key p { margin: 0; font-size: 14px; line-height: 1.6 }
html.relieve .app-shell:not(.anonymous) #view .map-compare-key { border-color: rgb(217 152 174 / .35); border-left: 3px solid #a8325a; background: linear-gradient(100deg, rgb(139 30 63 / .22), rgb(13 21 30 / .72) 70%) }
html.relieve .app-shell:not(.anonymous) #view .map-compare-key h3 { color: var(--m-rose) }
html.relieve .app-shell:not(.anonymous) #view .map-compare-key p { font-family: var(--font-display); font-size: 16.5px; line-height: 1.5; color: #f7f3ea }
/* A narrow frame reads one criterion at a time: each row becomes a card that names its figures. */
@container (max-width: 620px) {
  html.relieve .app-shell:not(.anonymous) #view .map-compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; border: 0; background: none; overflow: visible }
  html.relieve .app-shell:not(.anonymous) #view .map-compare-row { grid-template-columns: minmax(0, 1fr); border: 1px solid var(--m-line); border-radius: 14px; background: rgb(13 21 30 / .78); overflow: hidden }
  html.relieve .app-shell:not(.anonymous) #view .map-compare-row.is-head { display: none }
  html.relieve .app-shell:not(.anonymous) #view .map-compare-row > * + * { border-left: 0; border-top: 1px solid var(--m-line) }
  html.relieve .app-shell:not(.anonymous) #view .map-compare-criterion { background: rgb(139 30 63 / .16) }
  html.relieve .app-shell:not(.anonymous) #view .map-compare-cell-term { display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--m-rose) }
}

/* Proceso: the level control, the line of stages and the open stage below it. */
html.relieve .app-shell:not(.anonymous) #view .map-process-levels {
  display: inline-flex; gap: 2px; margin: 0 0 14px; padding: 3px; border-radius: 12px; border: 1px solid var(--m-line); background: var(--m-glass);
}
html.relieve .app-shell:not(.anonymous) #view .map-process-level {
  min-height: 32px; margin: 0; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; box-shadow: none; transform: none;
  color: var(--m-soft); font-size: 13px; font-weight: 600;
}
html.relieve .app-shell:not(.anonymous) #view .map-process-level:hover { background: rgb(255 255 255 / .07); color: #f7f3ea; transform: none }
html.relieve .app-shell:not(.anonymous) #view .map-process-level[aria-pressed='true'] { background: rgb(139 30 63 / .34); color: #f7f3ea; box-shadow: inset 0 -2px 0 #a8325a }
html.relieve .app-shell:not(.anonymous) #view .map-process-lane { overflow-x: auto; overscroll-behavior-x: contain; margin: 0 -18px; padding: 4px 18px 10px; scrollbar-width: thin }
html.relieve .app-shell:not(.anonymous) #view .map-process-track { display: flex; align-items: stretch; gap: 26px; width: max-content; min-width: 100%; margin: 0; padding: 0; list-style: none }
html.relieve .app-shell:not(.anonymous) #view .map-process-step { position: relative; flex: 1 0 168px; max-width: 260px }
html.relieve .app-shell:not(.anonymous) #view .map-process-step + .map-process-step::before {
  content: ""; position: absolute; top: 25px; left: -27px; width: 28px; height: 2px; background: linear-gradient(90deg, rgb(217 152 174 / .25), rgb(217 152 174 / .6));
}
html.relieve .app-shell:not(.anonymous) #view .map-process-step + .map-process-step::after {
  content: ""; position: absolute; top: 21px; left: -6px; border: 5px solid transparent; border-left-color: rgb(217 152 174 / .7);
}
html.relieve .app-shell:not(.anonymous) #view .map-process-card {
  display: grid; align-content: start; gap: 6px; width: 100%; height: 100%; margin: 0; padding: 12px 14px; border: 1px solid var(--m-line); border-radius: 14px;
  background: rgb(13 21 30 / .82); box-shadow: none; transform: none; color: var(--m-text); text-align: left; transition: border-color .2s, background .2s;
}
html.relieve .app-shell:not(.anonymous) #view .map-process-card:hover { border-color: rgb(217 152 174 / .4); background: rgb(23 33 45 / .9); transform: none }
html.relieve .app-shell:not(.anonymous) #view .map-process-card[aria-current='step'] { border-color: #a8325a; background: linear-gradient(160deg, rgb(139 30 63 / .32), rgb(13 21 30 / .9) 75%); box-shadow: 0 14px 30px -20px rgb(168 50 90 / .9) }
html.relieve .app-shell:not(.anonymous) #view .map-process-number {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgb(217 152 174 / .5);
  font: 600 12px/1 var(--font-mono); color: var(--m-rose);
}
html.relieve .app-shell:not(.anonymous) #view .map-process-card[aria-current='step'] .map-process-number { border-color: transparent; background: #a8325a; color: #f7f3ea }
html.relieve .app-shell:not(.anonymous) #view .map-process-label { font-family: var(--font-display); font-weight: 420; font-size: 16px; line-height: 1.25; color: #f7f3ea }
html.relieve .app-shell:not(.anonymous) #view .map-process-meta { display: grid; gap: 2px; font-size: 12px; line-height: 1.4; color: var(--m-soft) }
html.relieve .app-shell:not(.anonymous) #view .map-process-fact b { font-weight: 650; color: var(--m-text) }
html.relieve .app-shell:not(.anonymous) #view .map-process-summary { font-size: 12.5px; line-height: 1.45; color: var(--m-soft) }
html.relieve .app-shell:not(.anonymous) #view .map-process-fork { justify-self: start; padding: 2px 8px; border-radius: 999px; background: rgb(232 201 138 / .1); color: #e8c98a; font: 500 11px/1.4 var(--font-mono) }
/* The level only filters what each card shows; the open stage below always has everything. */
html.relieve .app-shell:not(.anonymous) #view .map-process-step :is(.map-process-meta, .map-process-summary, .map-process-fork) { display: none }
html.relieve .app-shell:not(.anonymous) #view .is-process[data-level='deadlines'] .map-process-step .map-process-meta,
html.relieve .app-shell:not(.anonymous) #view .is-process[data-level='full'] .map-process-step :is(.map-process-meta, .map-process-fork) { display: grid }
html.relieve .app-shell:not(.anonymous) #view .is-process[data-level='full'] .map-process-step .map-process-summary { display: block }
html.relieve .app-shell:not(.anonymous) #view .map-process-detail {
  max-width: 78ch; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--m-line-strong); border-radius: 16px; background: rgb(17 27 37 / .94);
}
html.relieve .app-shell:not(.anonymous) #view .map-process-detail-head { display: grid; gap: 4px; margin-bottom: 10px }
html.relieve .app-shell:not(.anonymous) #view .map-process-detail-head h3 { font-family: var(--font-display); font-weight: 420; font-size: 21px; line-height: 1.2; letter-spacing: -.01em; outline: none }
html.relieve .app-shell:not(.anonymous) #view .map-process-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0 0 12px; font-size: 13.5px; line-height: 1.5 }
html.relieve .app-shell:not(.anonymous) #view .map-process-facts dt { font-weight: 650; color: var(--m-soft) }
html.relieve .app-shell:not(.anonymous) #view .map-process-facts dd { margin: 0; color: var(--m-text) }
html.relieve .app-shell:not(.anonymous) #view .map-process-text { margin: 0 0 10px; font-size: 14px; line-height: 1.65; color: var(--m-text) }
html.relieve .app-shell:not(.anonymous) #view .map-process-consequence {
  margin: 4px 0 12px; padding: 9px 12px; border-left: 2px solid var(--m-amber); border-radius: 0 8px 8px 0; background: rgb(232 201 138 / .05);
}
html.relieve .app-shell:not(.anonymous) #view .map-process-consequence strong { display: block; margin-bottom: 2px; font-size: 12px; color: #e8c98a }
html.relieve .app-shell:not(.anonymous) #view .map-process-consequence p { margin: 0; font-size: 13.5px; line-height: 1.55 }
html.relieve .app-shell:not(.anonymous) #view .map-process-subhead { margin: 4px 0 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--m-soft) }
html.relieve .app-shell:not(.anonymous) #view .map-process-branches { display: grid; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none }
html.relieve .app-shell:not(.anonymous) #view .map-process-branches li { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--m-line); border-radius: 10px; font-size: 13.5px; line-height: 1.5 }
html.relieve .app-shell:not(.anonymous) #view .map-process-branches strong { font-weight: 650; color: #f7f3ea }
html.relieve .app-shell:not(.anonymous) #view .map-process-branches span { color: var(--m-soft) }
html.relieve .app-shell:not(.anonymous) #view .map-process-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--m-line) }
html.relieve .app-shell:not(.anonymous) #view .map-process-nav button { min-height: 34px; margin: 0; padding: 0 12px; font-size: 13px }
html.relieve .app-shell:not(.anonymous) #view .map-process-nav button:disabled { opacity: .4; cursor: default }
/* A narrow frame turns the line vertical: stages stack with the connector running down. */
@container (max-width: 560px) {
  html.relieve .app-shell:not(.anonymous) #view .map-process-lane { overflow: visible; margin: 0; padding: 0 }
  html.relieve .app-shell:not(.anonymous) #view .map-process-track { flex-direction: column; gap: 14px; width: auto; min-width: 0 }
  html.relieve .app-shell:not(.anonymous) #view .map-process-step { flex: none; max-width: none }
  html.relieve .app-shell:not(.anonymous) #view .map-process-step + .map-process-step::before { top: -15px; left: 26px; width: 2px; height: 16px; background: rgb(217 152 174 / .5) }
  html.relieve .app-shell:not(.anonymous) #view .map-process-step + .map-process-step::after { content: none }
  html.relieve .app-shell:not(.anonymous) #view .map-process-card { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px }
  html.relieve .app-shell:not(.anonymous) #view .map-process-card > :not(.map-process-number) { grid-column: 2 }
  html.relieve .app-shell:not(.anonymous) #view .map-process-number { grid-row: 1 / span 4 }
  html.relieve .app-shell:not(.anonymous) #view .map-process-levels { display: flex }
  html.relieve .app-shell:not(.anonymous) #view .map-process-level { flex: 1; padding: 0 6px }
}

/* "Graficar lo que falta": the paid follow-up, inside the Alcance sheet, asks before it spends. */
html.relieve .app-shell:not(.anonymous) #view .map-complement { display: grid; gap: 8px; margin-top: 6px; padding: 10px 4px 0; border-top: 1px solid var(--m-line) }
html.relieve .app-shell:not(.anonymous) #view .map-complement-start { justify-self: start; min-height: 36px; margin: 0; padding: 0 14px; border-radius: 999px; font-size: 13.5px }
html.relieve .app-shell:not(.anonymous) #view .map-complement-confirm { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgb(217 152 174 / .35); background: rgb(139 30 63 / .14) }
html.relieve .app-shell:not(.anonymous) #view .map-complement-confirm[hidden] { display: none }
html.relieve .app-shell:not(.anonymous) #view .map-complement-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--m-text, var(--r-paper)) }
html.relieve .app-shell:not(.anonymous) #view .map-complement .credit-cost-line { font-size: 12px }
html.relieve .app-shell:not(.anonymous) #view .map-complement-actions { display: flex; flex-wrap: wrap; gap: 8px }
html.relieve .app-shell:not(.anonymous) #view .map-complement-actions button { min-height: 36px; margin: 0; padding: 0 14px; border-radius: 999px; font-size: 13.5px }
html.relieve .app-shell:not(.anonymous) #view .map-complement .form-status { margin: 0; font-size: 12.5px }
html.relieve .app-shell:not(.anonymous) #view .map-complement .form-status:empty { display: none }

/* One quiet line above the map: "Mapa extenso" and the map it complements. */
html.relieve .app-shell:not(.anonymous) #view .visual-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; font-size: 12.5px; color: var(--i-soft) }
html.relieve .app-shell:not(.anonymous) #view .visual-meta-tag { padding: 2px 9px; border-radius: 999px; border: 1px solid rgb(217 152 174 / .35); color: var(--r-rose); font: 500 11px/1.5 var(--font-mono); letter-spacing: .06em; text-transform: uppercase }
html.relieve .app-shell:not(.anonymous) #view .visual-meta-link { display: inline; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--r-rose); font-size: inherit; text-decoration: underline; text-underline-offset: 2px }

/* Extensión has two options: the form's segmented rail takes two columns, one on a phone. */
html.relieve .app-shell:not(.anonymous) #view .desk-form .visual-extent .study-choice-rail { grid-template-columns: repeat(2, minmax(0, 1fr)) }
@media (max-width: 800px) {
  html.relieve .app-shell:not(.anonymous) #view .desk-form .visual-extent .study-choice-rail { grid-template-columns: minmax(0, 1fr) }
  html.relieve .app-shell:not(.anonymous) #view .study-map-layout .map-layout-canvas { padding-inline: 12px; border-radius: 16px }
}
@media (prefers-reduced-motion: reduce) {
  html.relieve .app-shell:not(.anonymous) #view .study-map-layout * { transition: none !important; scroll-behavior: auto !important }
}
