/* Kuotia: the pieces of the companies' page (autonomos/gestoria_empresas.html, seo-map §3c). Load after kuotia-site.css,
   kuotia-explain.css and kuotia-conexiones.css. Colours always come with their word.
   - .pv-so: a sociedad's portal (pv/_sociedad.html): Impuestos on the pv-period markup plus «Lo que hemos hecho»
     (.pv-so-done), the Resumen with its result, months and gastos by kind (.pv-so-sum), and Banco with one state per
     movement (.pv-so-bank).
   - .so-cal: a company's year, month by month, with the returns due in each and the annual accounts.
   - .so-price: the two ways to pay, monthly or the year, and what both include. */

/* ───────────── Portal: shared ───────────── */
.pv-so-head { display: grid; gap: 2px; padding: 16px 18px 0; }
.pv-so-head b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

/* Impuestos: «Lo que hemos hecho» */
.pv-so .pv-pd-rows { margin-top: 16px; }
.pv-so-done { padding: 12px 18px 14px; background: var(--surface-2); }
.pv-so-done p { margin: 0 0 8px; font-size: 12px; font-weight: 650; color: var(--muted); }
.pv-so-done ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pv-so-done li { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pv-so-done li b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }

/* Resumen: result, months and gastos by kind */
.pv-so-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 18px 0; }
.pv-so-kpis > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.pv-so-kpis b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-so-kpis .is-res { border-color: color-mix(in srgb, var(--success-mark) 35%, var(--line)); background: color-mix(in srgb, var(--success-mark) 9%, var(--surface)); }
.pv-so-kpis .is-res span { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--success); }
.pv-so-months { margin: 14px 18px 0; }
.pv-so-months ol { list-style: none; margin: 0; padding: 0; height: 92px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; align-items: end; }
.pv-so-months li { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 16px; }
.pv-so-months li::before, .pv-so-months li::after { content: ""; width: 42%; border-radius: 3px 3px 0 0; }
.pv-so-months li::before { height: calc(var(--i, 0) * 1%); background: var(--accent); }
.pv-so-months li::after { height: calc(var(--g, 0) * 1%); background: color-mix(in srgb, var(--ink) 28%, transparent); }
.pv-so-months li.is-prov::before, .pv-so-months li.is-prov::after { opacity: .45; }
.pv-so-months li.is-empty::before, .pv-so-months li.is-empty::after { height: 2px; background: var(--line); }
.pv-so-months li span { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.pv-so-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }
.pv-so-key span { display: inline-flex; align-items: center; gap: 5px; }
.pv-so-key i { width: 9px; height: 9px; border-radius: 2px; }
.pv-so-key .k-in { background: var(--accent); }
.pv-so-key .k-out { background: color-mix(in srgb, var(--ink) 28%, transparent); }
.pv-so-kinds { margin-top: 14px; border-top: 1px solid var(--line); padding: 10px 18px 14px; display: grid; gap: 8px; }
.pv-so-kinds > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13px; }
.pv-so-kinds span { color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-so-kinds b { font-variant-numeric: tabular-nums; }
.pv-so-kinds i { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 30%, transparent) calc(var(--w) * 1%), var(--bg-soft) 0); }

/* Banco: one state per movement */
.pv-so-rows { margin-top: 12px; border-top: 1px solid var(--line); }
.pv-so-mv { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "d n a" "d n s"; align-items: center; gap: 2px 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.pv-so-mv:last-child { border-bottom: 0; }
.pv-so-d { grid-area: d; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.pv-so-mv .pv-name { grid-area: n; }
.pv-so-mv .pv-name small { display: block; }
.pv-so-amt { grid-area: a; justify-self: end; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-so-amt.is-in { color: var(--success); }
.pv-so-st { grid-area: s; justify-self: end; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; border: 1px solid var(--line); color: var(--ink-2); background: var(--bg-soft); }
.pv-so-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pv-so-st.is-done, .pv-so-st.is-ok { color: var(--success); background: color-mix(in srgb, var(--success-mark) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success-mark) 28%, transparent); }
.pv-so-st.is-busy { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.pv-so-st.is-warn { color: var(--pf-warn-ink, #8a5300); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn-line) 45%, transparent); }
.pv-so-mv.is-miss { grid-template-areas: "d n a" "d n s" "d b b"; background: color-mix(in srgb, var(--warn-line) 6%, var(--surface)); }
.pv-so-mv.is-miss .pv-btn { grid-area: b; justify-self: end; margin-top: 6px; }
@container (max-width: 400px) {
  .pv-so-mv { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "d n a" "d s s"; padding: 10px 14px; align-items: start; }
  .pv-so-mv.is-miss { grid-template-areas: "d n a" "d s s" "d b b"; }
  .pv-so-st { justify-self: start; margin-top: 4px; }
  .pv-so-d { white-space: nowrap; font-size: 11px; padding-top: 2px; }
  .pv-so-mv .pv-name b, .pv-so-mv .pv-name small { white-space: normal; }
  .pv-so-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-so-kpis .is-res { grid-column: 1 / -1; }
  .pv-so-done li b { font-size: 15px; }
}

/* ───────────── A company's year (.so-cal) ───────────── */
.so-cal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.so-cal > li { display: flex; flex-direction: column; gap: 8px; min-height: 132px; padding: 14px 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.so-cal > li.is-quiet { background: var(--bg-soft); }
.so-cal > li.is-quiet p { margin-top: 4px; }
.so-cal .so-m { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--ink); }
.so-cal .so-m small { display: block; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.so-cal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.so-cal ul li { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.so-cal ul li.is-year { color: var(--success); background: color-mix(in srgb, var(--success-mark) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success-mark) 30%, var(--line)); }
.so-cal ul li.is-acc { font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-color: var(--line); }
.so-cal p { margin: auto 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.so-cal-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: var(--fs-sm, 14px); color: var(--ink-2); }
.so-cal-key span { display: inline-flex; align-items: center; gap: 7px; }
.so-cal-key i { width: 14px; height: 14px; border-radius: 4px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.so-cal-key i.is-year { background: color-mix(in srgb, var(--success-mark) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success-mark) 30%, var(--line)); }
.so-cal-key i.is-acc { background: var(--bg-soft); border-color: var(--line-strong); }
@media (max-width: 1080px) { .so-cal { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .so-cal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .so-cal > li { min-height: 0; } .so-cal > li.is-quiet { display: none; } }

/* ───────────── Price (.so-price) ───────────── */
.so-price .plans { margin-top: 0; }
.so-price .plan-price .n { font-variant-numeric: tabular-nums; }
.so-price .plan { position: relative; }
.so-price .plan-badge { position: absolute; top: 24px; right: 28px; display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--success); background: color-mix(in srgb, var(--success-mark) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--success-mark) 28%, transparent); }
.so-inc { margin-top: var(--col-gap); padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.so-inc .ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.so-inc .so-apart { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm, 14px); }
@media (max-width: 760px) { .so-inc { padding: 20px 18px; } .so-inc .ticks { grid-template-columns: minmax(0, 1fr); } }

/* Head: the CTA row without a signup */
.so-mail { font-weight: 600; }
.cmp.pf .page-head .cta-row + .proof { margin-top: 20px; }
.so-start-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.cta-flow .so-cta-art { justify-self: end; width: 100%; max-width: 380px; }
.cta-flow .so-cta-art .pv { margin: 0; }
@media (max-width: 760px) { .cta-flow .so-cta-art { justify-self: stretch; } }
@media (max-width: 600px) {
  .so-cta-art .pv-res-row { flex-wrap: wrap; row-gap: 6px; }
  .so-cta-art .pv-res-amt { text-align: left; }
}
@media (max-width: 760px) { .so-start-cta .btn { width: 100%; justify-content: center; } }
