/*
 * Cost of living by household (site/research/cost-of-living-by-household.html).
 * Loaded after /style.css, and only by that page. A file rather than a
 * <style> block because the site's content-security-policy is style-src 'self'.
 *
 * Colours are tokens on .lc, from the brand's own: light by default, as the
 * site is, with a dark set under data-theme="dark" — the switch the software
 * at app.creditcresttechnologies.com.au already uses — so the page follows
 * the day the site gains one. Cobalt bars on white are 5.4:1; the dark set
 * uses the lightened cobalt and ice the brand derives for midnight.
 */

.lc {
  --lc-ink: var(--midnight);
  --lc-text: var(--text);
  --lc-sub: var(--muted);
  --lc-fill: var(--cobalt);
  --lc-all: var(--midnight);
  --lc-cpi: var(--midnight);
  --lc-grid: var(--border);
  --lc-rule: var(--line);
  --lc-tag: var(--surface);
}
:root[data-theme="dark"] body { background: var(--midnight); }
:root[data-theme="dark"] .lc {
  --lc-ink: var(--white);
  --lc-text: var(--on-dark);
  --lc-sub: var(--on-dark-dim);
  --lc-fill: var(--cobalt-light);
  --lc-all: var(--ice);
  --lc-cpi: var(--white);
  --lc-grid: var(--line-dark);
  --lc-rule: var(--line-dark);
  --lc-tag: var(--midnight-3);
  color: var(--lc-text);
}
:root[data-theme="dark"] .site-head { background: rgba(7, 13, 36, .94); border-bottom-color: var(--line-dark); }
:root[data-theme="dark"] .site-head .brand-logo { content: url(/media/brand/logo-reverse.svg?v=3); }
:root[data-theme="dark"] .site-head .nav a:not(.btn), :root[data-theme="dark"] .menu nav a { color: var(--on-dark); }
:root[data-theme="dark"] .menu summary span { background: var(--on-dark); }
:root[data-theme="dark"] .lc :focus-visible { outline-color: var(--ice); }
.lc h1, .lc h2, .lc h3 { color: var(--lc-ink); }
.lc .doc p, .lc .doc li, .lc .section-lede { color: var(--lc-text); }
:root[data-theme="dark"] .lc a { color: var(--ice); }
:root[data-theme="dark"] .lc .kicker { color: var(--ice); }

/* A shorter rhythm than the product pages: this is one argument, read down. */
.lc-top { padding-bottom: 48px; }
.lc-sec { padding: 40px 0; border-top: 1px solid var(--lc-rule); }
.lc-head { margin-bottom: 32px; }
.lc-lede strong { color: var(--lc-ink); font-weight: 600; }
.lc-notice { border: 1px solid var(--lc-cpi); border-radius: var(--r-card); padding: 12px 16px; margin: 0 0 16px; font-size: 16px; color: var(--lc-ink); }
.lc-meta { font-size: 14px; color: var(--lc-sub); margin: 14px 0 0; }
.lc .doc h3 { font-size: 19px; margin: 32px 0 10px; }
.lc .doc ol { margin: 0 0 14px; padding-left: 22px; }

/* ---------- the chart: HTML words, an SVG bar per row ---------- */
.lc-chart { margin: 0; max-width: 900px; }
.lc-chart figcaption { font-size: 15px; line-height: 1.5; color: var(--lc-sub); margin: 0 0 18px; max-width: 46em; }
.lc-chart figcaption b { display: block; color: var(--lc-ink); font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.lc-g { font: 600 12px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--lc-sub); margin: 22px 0 6px; }
.lc-rows { list-style: none; margin: 0; padding: 0; }
.lc-row, .lc-ticks { display: grid; grid-template-columns: minmax(0, 15.5rem) minmax(0, 1fr) 3.5rem; column-gap: 14px; align-items: center; }
.lc-row { padding: 4px 0; }
.lc-l { font-size: 15px; line-height: 1.3; color: var(--lc-ink); }
.lc-l small { display: block; font-size: 12.5px; color: var(--lc-sub); }
.lc-row-all .lc-l, .lc-row-all .lc-v { font-weight: 600; }
.lc-bar { display: block; width: 100%; height: 22px; overflow: visible; }
.lc-fill { fill: var(--lc-fill); }
.lc-fill-all { fill: var(--lc-all); }
.lc-fill-proxy { fill: none; stroke: var(--lc-fill); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.lc-grid { stroke: var(--lc-grid); stroke-width: 1; }
.lc-cpi { stroke: var(--lc-cpi); stroke-width: 2; stroke-dasharray: 3 2; }
.lc-v { font-size: 15px; font-weight: 500; color: var(--lc-ink); text-align: right; font-variant-numeric: tabular-nums; }
.lc-ticks { margin: 6px 0 0; font-size: 12px; line-height: 1; color: var(--lc-sub); font-variant-numeric: tabular-nums; }
.lc-ticks-s { display: flex; }
.lc-ticks-s > span { flex: 1; text-align: right; }
/* each label centred on its gridline, which is the segment's right edge */
.lc-ticks-s > span > span { display: inline-block; transform: translateX(50%); }

/* ---------- tables ---------- */
.lc-scroll { max-width: 100%; overflow-x: auto; }
.lc-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; margin: 4px 0 18px; }
.lc-table caption { text-align: left; font-size: 14px; color: var(--lc-sub); padding: 0 0 8px; }
.lc-table th, .lc-table td { padding: 9px 0 9px 12px; border-bottom: 1px solid var(--lc-rule); text-align: right; color: var(--lc-text); vertical-align: bottom; }
.lc-table th:first-child { padding-left: 0; text-align: left; }
.lc-table thead th { font-size: 12px; line-height: 1.3; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lc-sub); }
.lc-table tbody th { font-weight: 400; color: var(--lc-ink); }
.lc-table td { white-space: nowrap; }
.lc-table .lc-tr-cpi th, .lc-table .lc-tr-all th, .lc-table .lc-tr-all td { font-weight: 600; }
.lc-table .lc-tr-g th { padding-top: 20px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lc-sub); }
.lc-tag { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--lc-tag); color: var(--lc-sub); font-size: 11px; font-weight: 600; letter-spacing: .04em; line-height: 18px; vertical-align: 1px; text-transform: uppercase; }
.lc-sources li { overflow-wrap: anywhere; }
.lc-faq { margin: 24px 0 8px; }
.lc .lc-faq summary { font-size: 18px; color: var(--lc-ink); }
.lc .lc-faq details { border-bottom-color: var(--lc-rule); }

@media (max-width: 620px) {
  /* Phone: the name above its bar, the bar and figure below, so the bars
     keep most of the width and nothing scrolls sideways. */
  .lc-row { grid-template-columns: minmax(0, 1fr) 3.25rem; grid-template-areas: "l l" "b v"; row-gap: 2px; padding: 5px 0; }
  .lc-row .lc-l { grid-area: l; }
  .lc-row .lc-bar { grid-area: b; }
  .lc-row .lc-v { grid-area: v; }
  .lc-ticks { grid-template-columns: minmax(0, 1fr) 3.25rem; }
  .lc-ticks-l { display: none; }
  .lc-table { font-size: 14px; }
  .lc-table th, .lc-table td { padding-left: 8px; }
  .lc-table thead th { font-size: 11px; letter-spacing: .02em; }
  .lc-sec { padding: 32px 0; }
}

@media print {
  .lc-sec { border-top: 0; }
  .lc-fill, .lc-fill-all { fill: black; }
  .lc-faq details { display: block; }
}
