/* Article "Cost of living" (/articles/cost-of-living/), on top of style.css
   and articles.css. Classes start with .cl-. Cheaper in minutes of work: --good;
   dearer: --bad; the comparison year: ink. */

/* controls above the basket: comparison year and the inflation switch */
.cl-controls { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; margin-top: 4px !important; margin-bottom: 14px; }
.cl-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.cl-ctl .label { margin: 0; }
.cl-ctl .art-mode { margin-top: 0; }

/* the basket: a grid of item cards inside one figure */
.cl-basket-fig { padding: 16px 14px 6px; }
.cl-basket-fig > .legend { margin-bottom: 10px; }
.cl-basket { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
@media (max-width: 560px) { .cl-basket { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .cl-basket-fig { padding: 10px 8px 6px; } }
.cl-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 14px 12px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.cl-head { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cl-name { font: 650 15px/1.2 var(--font); color: var(--ink); letter-spacing: -0.01em; }
.cl-unit { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.cl-now { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cl-price { font: 600 26px/1.05 var(--mono); letter-spacing: -0.05em; color: var(--ink); }
.cl-when { font-size: 11.5px; color: var(--muted); }
.cl-spark { min-height: 56px; margin: 2px 0 2px; }
.cl-spark .tip { min-width: 170px; }
.cl-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); min-height: 26px; border-top: 1px solid var(--border); padding-top: 5px; }
.cl-k { color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-v { font: 600 12px/1.25 var(--font); font-variant-numeric: tabular-nums; color: var(--ink); min-width: 0; }
.cl-row .pill { padding: 4px 7px; font-size: 11.5px; }
@media (max-width: 560px) {
  .cl-item { padding: 12px 10px 10px; border-radius: 14px; }
  .cl-price { font-size: 22px; }
  .cl-row { grid-template-columns: auto 1fr; gap: 2px 6px; }
  .cl-row .pill { grid-column: 1 / -1; justify-self: start; }
}
.cl-yband { fill: var(--ink); fill-opacity: 0.08; }
.sw-sq.cl-sw-year { background: var(--ink); opacity: 0.14; }
.cl-sln { stroke-width: 1.8; }

/* minutes of work */
.cl-plot-min { min-height: 560px; }
.cl-plot-egg { min-height: 380px; }
.cl-arrow { stroke-width: 3; stroke-linecap: round; }
.cl-arrow.up { stroke: var(--good); }
.cl-arrow.down { stroke: var(--bad); }
.cl-arrow.flat { stroke: var(--muted); }
.cl-then { fill: var(--surface); stroke: var(--muted); stroke-width: 2; }
.cl-now-dot { stroke: var(--surface); stroke-width: 2; }
.cl-now-dot.up { fill: var(--good); }
.cl-now-dot.down { fill: var(--bad); }
.cl-now-dot.flat { fill: var(--muted); }
.cl-rlab { fill: var(--ink); font: 550 13px/1 var(--font); }
.cl-since { fill: var(--muted); font-weight: 500; font-size: 11px; }
.cl-rval { fill: var(--ink-2); font: 500 12px/1 var(--mono); }
.cl-chg { font-weight: 650; }
.cl-chg.up { fill: var(--good); }
.cl-chg.down { fill: var(--bad); }
.cl-sep { stroke: var(--border); stroke-width: 1; }
.cl-rowhi { fill: var(--hover); }
.cl-sw-then { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--muted); }
.cl-sw-now { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.cl-sw-now.up { background: var(--good); }
.cl-sw-now.down { background: var(--bad); }
.cl-tip-u { color: var(--muted); font-weight: 500; font-size: 11px; margin-left: 4px; }

/* marked points on the line charts */
.cl-mark { fill: var(--ink); font: 650 12px/1 var(--mono); }
.cl-mark-m { fill: var(--muted); font: 500 10.5px/1 var(--font); }

/* the decade table */
.cl-table td.cl-na { color: var(--muted); }
.cl-table td.cl-now-td { font-weight: 650; color: var(--ink); }

/* keep legends clear of the full-screen button (articles.css pads them 10px) */
.art .chart.has-full > .legend { padding-right: 44px; }
