/* Notes (EN and ES), on top of software.css: same tokens, bar, type and footer. US-091. */

.notas-open h1, .nota-open h1 { max-width: 12ch; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { color: var(--ink); text-decoration: underline; }
.nota-open .meta { margin-top: 22px; color: var(--muted); font-size: .8125rem; }
.nota-open .say p + p { margin-top: 14px; }
.nota-open .say .q { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--ink); color: var(--ink); }

/* index: one row per note, the card on the left */
.notas-lista { padding-bottom: 96px; }
.notas { list-style: none; padding: 0; border-top: 1px solid var(--ink); }
.notas > li { border-bottom: 1px solid var(--line); }
.nota { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: center; padding: 28px 0; text-decoration: none; border-radius: 3px; }
.nota .thumb img { display: block; width: 100%; height: auto; border-radius: 4px; outline: 1px solid var(--line); }
.nota .tx { display: grid; gap: 10px; }
.nota .meta { display: flex; gap: 16px; color: var(--muted); }
.nota .t { display: inline-flex; align-items: baseline; gap: 12px; font-weight: 500; font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.04; letter-spacing: -.035em; }
.nota .d { color: var(--text-2); font-size: 1.0625rem; max-width: 40ch; }
.nota .ar { flex: none; width: .4em; height: .4em; fill: none; stroke: currentColor; stroke-width: 1.4; color: var(--muted); transition: transform .2s var(--ease), color .2s var(--ease); }
a.nota:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }
a.nota:hover .ar { transform: translate(2px, -2px); color: var(--ink); }

/* a note: the four cards */
.cards { list-style: none; padding: 0; margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cards figure { margin: 0; }
.cards a { display: block; border-radius: 4px; }
.cards img { display: block; width: 100%; height: auto; border-radius: 4px; outline: 1px solid var(--line); transition: transform .2s var(--ease); }
.cards a:hover img { transform: translateY(-2px); }
.cards figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; color: var(--muted); }

.mas p { max-width: 62ch; color: var(--text-2); font-size: 1.1875rem; line-height: 1.55; }
.mas .kicker + p { margin-top: 20px; }
.mas p + p { margin-top: 14px; }
.volver { padding: 40px 0 72px; }

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .nota { grid-template-columns: 30vw minmax(0, 1fr); gap: 20px; padding: 20px 0; }
  .nota .d { font-size: .9375rem; }
  .notas-lista { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .nota .ar, .cards img { transition: none; }
  .cards a:hover img { transform: none; }
}

/* a long article (US-090): same column and rhythm as "more on this case" */
.articulo { padding-top: 24px; }
.articulo h2 { margin-top: 48px; max-width: 30ch; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.articulo h2:first-child { margin-top: 0; }
.articulo p { max-width: 62ch; color: var(--text-2); font-size: 1.1875rem; line-height: 1.55; margin-top: 14px; }
.articulo h2 + p { margin-top: 18px; }
.articulo h3 { margin-top: 36px; max-width: 34ch; font-weight: 500; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.15; letter-spacing: -.02em; }
.articulo h3 + p { margin-top: 12px; }
.articulo .tabla { margin-top: 20px; overflow-x: auto; border-radius: 4px; }
.articulo table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .9375rem; line-height: 1.45; text-align: left; }
.articulo th, .articulo td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.articulo thead th { border-bottom: 1px solid var(--ink); color: var(--ink); font-weight: 500; }
.articulo tbody th { color: var(--ink); font-weight: 500; }
.articulo .tabla:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.articulo ul { list-style: none; padding: 0; margin-top: 14px; max-width: 62ch; }
.articulo li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 1.1875rem; line-height: 1.5; }
.articulo li:first-child { border-top: 1px solid var(--ink); }
.articulo h3 + ul { margin-top: 14px; }

/* figures inside an article (US-090): a screenshot, the cost chart and the in/out diagram.
   No inline styles (CSP): bar widths are SVG attributes, colors come from the theme tokens. */
.articulo .fig { margin: 40px 0 8px; max-width: 760px; }
.articulo .fig figcaption { margin-top: 14px; max-width: 62ch; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.fig-img img { display: block; width: 100%; height: auto; border-radius: 4px; outline: 1px solid var(--line); background: #0b0d10; }

.costos { padding-top: 22px; border-top: 1px solid var(--ink); }
.costos .fig-t { margin: 0; max-width: none; color: var(--ink); font-weight: 500; font-size: 1.125rem; line-height: 1.3; }
.costos .grupo { margin-top: 22px; }
.costos .gn { margin: 0 0 4px; max-width: none; color: var(--muted); font: 500 .75rem/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.costos ul { list-style: none; padding: 0; margin: 0; max-width: none; }
.costos li.fila, .costos .eje { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 5.75rem; gap: 2px 18px; align-items: center; padding: 6px 0; border: 0; }
.costos li.fila:first-child { border: 0; }
.costos .et { color: var(--text-2); font-size: .9375rem; line-height: 1.3; }
.costos .v { color: var(--ink); font-weight: 500; font-size: 1rem; white-space: nowrap; }
.costos .pista { display: block; overflow: visible; }
.costos .pista .g { stroke: var(--line); stroke-width: 1; }
.costos .pista .b { fill: var(--ctl-line); }
.costos .pista .b-sin, .costos .pista .flecha path { fill: var(--ink); }
.costos .pista .b-cero { fill: var(--ok); }
.costos .sin .et { color: var(--ink); }
.costos .sin .v { padding-left: 6px; }
.costos .eje { padding-top: 0; color: var(--muted); font-size: .75rem; line-height: 1; }
.costos .ej { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.costos .ej span { justify-self: end; transform: translateX(50%); }
.costos .ej span:first-child { position: absolute; left: 0; transform: none; }

.esquema .pasos { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.esquema .pasos > li { position: relative; padding: 16px 26px 18px 0; border: 0; border-top: 1px solid var(--ink); font-size: 1rem; }
.esquema .pasos > li + li { padding-left: 26px; border-left: 1px solid var(--line); }
.esquema .pasos > li:first-child { border-top: 1px solid var(--ink); }
.esquema .pasos > li:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 50%; z-index: 1; padding: 4px 0; background: var(--bg); color: var(--ink); font-size: 1.125rem; line-height: 1; transform: translateY(-50%); }
.esquema .pt { margin: 0; max-width: none; color: var(--ink); font-weight: 500; font-size: 1.0625rem; line-height: 1.3; }
.esquema .pasos ul { list-style: none; padding: 0; margin: 10px 0 0; max-width: none; }
.esquema .pasos ul li, .esquema .pasos ul li:first-child { padding: 3px 0; border: 0; color: var(--text-2); font-size: .9375rem; line-height: 1.4; }
.esquema .fuera { margin-top: 14px; padding-top: 12px; max-width: none; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }

@media (max-width: 640px) {
  .articulo .fig { margin-top: 32px; }
  .costos li.fila { grid-template-columns: minmax(0, 1fr) 5.25rem; gap: 2px 14px; padding: 8px 0 2px; }
  .costos li.fila .et { grid-column: 1 / -1; }
  .costos .eje { grid-template-columns: minmax(0, 1fr) 5.25rem; gap: 2px 14px; }
  .costos .eje > .et { display: none; }
  .esquema .pasos { grid-template-columns: minmax(0, 1fr); }
  .esquema .pasos > li, .esquema .pasos > li + li { padding: 14px 0 20px; border-left: 0; }
  .esquema .pasos > li:not(:last-child)::after { content: "↓"; right: auto; left: 0; top: auto; bottom: -10px; padding: 0 8px 0 0; transform: none; }
}
