/* IBM Plex, SIL Open Font License 1.1: fonts/OFL.txt */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSans-Regular-Latin1.bdb53f2af8.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSans-Regular-Latin2.2fac6fc2f7.woff2") format("woff2"); unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSans-Regular-Pi.3b52c2fd87.woff2") format("woff2"); unicode-range: U+0E3F, U+2000-200D, U+2010-2012, U+2015-2016, U+2028-2029, U+202F, U+2032-2033, U+203C-203E, U+2042, U+2047-2049, U+2051, U+2053, U+2056, U+2058-205B, U+205D-205E, U+2070, U+2074-2079, U+2080-2089, U+20BC, U+20BE, U+20C0-20C1, U+20C3-20C4, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199, U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215, U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11, U+2E3A-2E3B, U+ECE0, U+EFCC, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSans-Medium-Latin1.668a0d9eab.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSans-Medium-Latin2.c683e49d01.woff2") format("woff2"); unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSans-Medium-Pi.61c2221468.woff2") format("woff2"); unicode-range: U+0E3F, U+2000-200D, U+2010-2012, U+2015-2016, U+2028-2029, U+202F, U+2032-2033, U+203C-203E, U+2042, U+2047-2049, U+2051, U+2053, U+2056, U+2058-205B, U+205D-205E, U+2070, U+2074-2079, U+2080-2089, U+20BC, U+20BE, U+20C0-20C1, U+20C3-20C4, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199, U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215, U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11, U+2E3A-2E3B, U+ECE0, U+EFCC, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSans-SemiBold-Latin1.8251b7fc61.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSans-SemiBold-Latin2.d32864469e.woff2") format("woff2"); unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSans-SemiBold-Pi.1beaaee0bf.woff2") format("woff2"); unicode-range: U+0E3F, U+2000-200D, U+2010-2012, U+2015-2016, U+2028-2029, U+202F, U+2032-2033, U+203C-203E, U+2042, U+2047-2049, U+2051, U+2053, U+2056, U+2058-205B, U+205D-205E, U+2070, U+2074-2079, U+2080-2089, U+20BC, U+20BE, U+20C0-20C1, U+20C3-20C4, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199, U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215, U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11, U+2E3A-2E3B, U+ECE0, U+EFCC, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSansCondensed-Medium-Latin1.028ba7ae28.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSansCondensed-Medium-Latin2.96331782aa.woff2") format("woff2"); unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSansCondensed-Medium-Pi.7009923818.woff2") format("woff2"); unicode-range: U+0E3F, U+2000-200D, U+2010-2012, U+2015-2016, U+2028-2029, U+202F, U+2032-2033, U+203C-203E, U+2042, U+2047-2049, U+2051, U+2053, U+2056, U+2058-205B, U+205D-205E, U+2070, U+2074-2079, U+2080-2089, U+20BC, U+20BE, U+20C0-20C1, U+20C3-20C4, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199, U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215, U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11, U+2E3A-2E3B, U+ECE0, U+EFCC, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSansCondensed-SemiBold-Latin1.f21ec2af24.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSansCondensed-SemiBold-Latin2.9e9aedf86e.woff2") format("woff2"); unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSansCondensed-SemiBold-Pi.1a4f9b38f0.woff2") format("woff2"); unicode-range: U+0E3F, U+2000-200D, U+2010-2012, U+2015-2016, U+2028-2029, U+202F, U+2032-2033, U+203C-203E, U+2042, U+2047-2049, U+2051, U+2053, U+2056, U+2058-205B, U+205D-205E, U+2070, U+2074-2079, U+2080-2089, U+20BC, U+20BE, U+20C0-20C1, U+20C3-20C4, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199, U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215, U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11, U+2E3A-2E3B, U+ECE0, U+EFCC, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular-Latin1.e8993d9466.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular-Latin2.8c5e48e4c6.woff2") format("woff2"); unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular-Pi.b8002770aa.woff2") format("woff2"); unicode-range: U+03C0, U+0E3F, U+2000-200D, U+2010-2012, U+2015, U+2028-2029, U+202F, U+2032-2033, U+203E, U+205F, U+2070, U+2074-2079, U+2080-2089, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199, U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215, U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+2400-2421, U+2500-259F, U+25CA, U+2713, U+274C, U+2B0E-2B11, U+3000, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexMono-Medium-Latin1.41201b658a.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexMono-Medium-Latin2.86208dbe8e.woff2") format("woff2"); unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexMono-Medium-Pi.92bd18415e.woff2") format("woff2"); unicode-range: U+03C0, U+0E3F, U+2000-200D, U+2010-2012, U+2015, U+2028-2029, U+202F, U+2032-2033, U+203E, U+205F, U+2070, U+2074-2079, U+2080-2089, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199, U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215, U+2219-221A, U+221E, U+222B, U+2236, U+2248, U+2260, U+2264-2265, U+2400-2421, U+2500-259F, U+25CA, U+2713, U+274C, U+2B0E-2B11, U+3000, U+FEFF, U+FFFD; }

/* Layout: ett mätinstrument på papper. Startsidan är en fråga med en bild och lager under; instrumentet är fem platser med samma tillstånd. Diagram och reglage bär sidan, texten ligger ett tryck bort. */
:root {
  --bg: #f4f6f5; --card: #ffffff; --sunk: #eaeeec; --ink: #142120; --ink2: #44514f; --mut: #6f7b79;
  --line: #d9dfdc; --grid: #e8ecea;
  --acc: #2a78d6; --acc-wash: rgba(42, 120, 214, 0.13); --acc-ink: #ffffff;
  --own: #eb6834; --own-wash: rgba(235, 104, 52, 0.14);
  --base: #5d6967; --hist: #b7c2bf; --hist-pay: #2a78d6;
  --s2: #1baf7a; --warn: #9a6a00; --warn-wash: rgba(237, 161, 0, 0.16);
  --veil: rgba(10, 16, 15, 0.35);
  --shadow: 0 1px 2px rgba(20, 33, 32, 0.06), 0 8px 24px rgba(20, 33, 32, 0.08);
  --f-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-cond: "IBM Plex Sans Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --topH: 52px; --tabH: 0px;
  /* step 25: one scale for margins and the air between cards and groups */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111615; --card: #192120; --sunk: #0d1211; --ink: #ecf1ef; --ink2: #b8c3c0; --mut: #8b9794;
  --line: #2c3634; --grid: #222b29;
  --acc: #3987e5; --acc-wash: rgba(57, 135, 229, 0.22); --acc-ink: #ffffff;
  --own: #d95926; --own-wash: rgba(217, 89, 38, 0.22);
  --base: #9aa6a3; --hist: #46524f; --hist-pay: #3987e5;
  --s2: #199e70; --warn: #e0b54a; --warn-wash: rgba(201, 133, 0, 0.22);
  --veil: rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #111615; --card: #192120; --sunk: #0d1211; --ink: #ecf1ef; --ink2: #b8c3c0; --mut: #8b9794;
  --line: #2c3634; --grid: #222b29;
  --acc: #3987e5; --acc-wash: rgba(57, 135, 229, 0.22); --acc-ink: #ffffff;
  --own: #d95926; --own-wash: rgba(217, 89, 38, 0.22);
  --base: #9aa6a3; --hist: #46524f; --hist-pay: #3987e5;
  --s2: #199e70; --warn: #e0b54a; --warn-wash: rgba(201, 133, 0, 0.22);
  --veil: rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-sans); margin: 0; }
p.sub, .slider > .sub { font-size: 14px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--card); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
a { color: var(--acc); }
.num, .tab { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1320px; margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 8px 20px; padding-block: 10px; min-height: 52px; }
.brand { font: 600 17px/1.2 var(--f-cond); letter-spacing: 0.01em; white-space: nowrap; border: 0; background: transparent; padding: 0; color: var(--ink); }
.places { display: flex; gap: 2px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
/* step 28: the main outcome's miniature in the instrument's top bar (56_mini.js); none on a phone */
.top .mini { display: flex; align-items: center; margin-left: auto; flex: none; }
.top .wrap > .mini ~ .places { flex-shrink: 0; }   /* the places keep their width; the miniature gives way (fitMini()) */
.mini-body > * { flex: none; }
.top .mini.nomini { display: none; }
.top .mini.nopic .mini-pic { display: none; }
.mini-body { flex: none; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 3px 3px 8px; background: var(--card); }
.mini-body[hidden], .mini-open[hidden], .mini-sel[hidden] { display: none; }
.mini-pic { display: inline-flex; }
.mini-svg .mini-b { fill: var(--line); }
.mini-svg .mini-b.on { fill: var(--acc); }
.mini-svg .mini-gap { fill: var(--mut); }
.mini-svg .axis { stroke: var(--mut); stroke-width: 1; }
.mini-txt { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.mini-num { border: 0; background: transparent; padding: 0; font: 500 16px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: underline dotted var(--line); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.mini-unit { font: 500 12px var(--f-cond); color: var(--mut); }
.mini-sel { font: 500 12px var(--f-cond); color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: 3px 4px; width: 150px; }
.mini-close { border: 0; background: transparent; color: var(--mut); font: 500 17px/1 var(--f-sans); width: 26px; height: 26px; border-radius: 6px; cursor: pointer; }
.mini-close:hover { color: var(--ink); background: var(--sunk); }
.mini-open { font: 500 12px var(--f-cond); color: var(--ink2); background: transparent; border: 1px dashed var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.mini-open:hover { color: var(--ink); border-color: var(--acc); }
.places button { border: 0; background: transparent; padding: 6px 10px; font: 500 14px var(--f-cond); color: var(--ink2); border-bottom: 2px solid transparent; white-space: nowrap; }
.places button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--acc); }
.shortcut { margin-left: auto; border: 1px solid var(--line); background: transparent; color: var(--ink2); border-radius: 999px; padding: 4px 12px; font: 500 13px var(--f-cond); letter-spacing: 0.03em; white-space: nowrap; }
.shortcut:hover { color: var(--ink); border-color: var(--ink2); }
.crumb { font: 500 13px var(--f-cond); color: var(--mut); border: 0; background: transparent; padding: 0; }

main { padding-block: var(--sp-5) var(--sp-7); }
h1 { font: 600 clamp(22px, 2.6vw, 30px)/1.15 var(--f-cond); margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
h2 { font: 600 13px/1.2 var(--f-cond); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink2); margin: 0 0 var(--sp-3); }
h3 { font: 600 16px/1.25 var(--f-cond); margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: var(--sp-4); min-width: 0; }
.sub { color: var(--mut); font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fdctl { align-items: flex-end; }   /* step 26 (tittpass 23): Jämför alla on the line of the measures, not above it */
.stack { display: grid; gap: var(--sp-4); min-width: 0; }
.hide { display: none !important; }
.empty { color: var(--mut); font-size: 13px; padding: 4px 0; }
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 5px 10px; font: 500 13px var(--f-cond); }
.btn[aria-pressed="true"] { border-color: var(--acc); color: var(--acc); }
.go { border: 0; background: var(--acc); color: var(--acc-ink); border-radius: 8px; padding: 8px 14px; font: 600 14px var(--f-cond); letter-spacing: 0.02em; }

/* step 25: the web site's data on its way (what is drawn stays, a little dimmed), and a file that could not be fetched */
.loadnote { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 48px 0; color: var(--mut); font-size: 15px; }
.loadnote.fail { flex-direction: column; align-items: flex-start; color: var(--ink); }
.loaddot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); animation: loaddot 1.2s ease-in-out infinite; }
@keyframes loaddot { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .loaddot { animation: none; } }
body.loading #app { opacity: 0.55; transition: opacity 0.2s; }

/* step 25: the folded rows of a column in Reformer, behind a line that names them (55_platser.js) */
/* step 27 (Love on app8, test 10): the whole row is the button, framed, with a word and a chevron that turns */
.rowsbtn { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); width: 100%; margin-top: var(--sp-1); border: 1px solid var(--line); border-radius: 6px; background: var(--card); padding: var(--sp-2) var(--sp-3); text-align: left; font: 500 13px/1.35 var(--f-cond); color: var(--ink2); cursor: pointer; }
.rowsbtn:hover { border-color: var(--acc); color: var(--ink); }
.rowsmore[hidden] { display: none; }
.rowsbtn .t { min-width: 0; }
.rowsbtn .c { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--acc); font: 600 13px/1 var(--f-cond); }
.rowsbtn .c::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.rowsbtn[aria-expanded="true"] .c::after { transform: translateY(2px) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .rowsbtn .c::after { transition: none; } }

/* the question mark */
.q { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--mut); font: 600 12px/1 var(--f-sans); padding: 0; vertical-align: 1px; flex: none; }
.q::before { content: ""; position: absolute; width: 36px; height: 36px; }
.q { position: relative; }
.q:hover, .q[aria-expanded="true"] { color: var(--acc); border-color: var(--acc); }
.pop { position: absolute; z-index: 40; width: min(320px, calc(100vw - 32px)); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.pop[hidden] { display: none; }
.pop strong { display: block; font: 600 14px var(--f-cond); margin-bottom: 4px; }
.pop p { margin: 0; color: var(--ink2); }
button.lnk { border: 0; background: transparent; padding: 0; color: var(--acc); font: 500 13px var(--f-sans); text-decoration: underline; text-underline-offset: 2px; text-align: left; }
.pop button.lnk { margin-top: 8px; }
.pop .dl { display: grid; gap: 2px; margin-top: 10px; }
.pop .dl a { font-size: 14px; }
.pop p { margin: 0; }
a.explore { font-weight: 600; }
.datamark { margin-left: auto; border: 1px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 4px; padding: 1px 6px; font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.04em; }
.datamark:hover, .datamark[aria-expanded="true"] { color: var(--acc); border-color: var(--acc); }
.std { display: inline-block; font: 600 12px/1.4 var(--f-cond); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.sug { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; }
.filledline { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.models { display: grid; gap: 8px; }
.model { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; border-top: 1px solid var(--grid); padding-top: 8px; }
.model.off strong { color: var(--ink2); }
.more-m > summary { cursor: pointer; list-style-position: inside; }
.explore { display: grid; gap: 4px; }
.explore > h2 { margin: 0; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px 6px 10px; font: 500 14px var(--f-cond); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip[aria-pressed="true"] { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); flex: none; }
.chip .sw.base { background: var(--base); } .chip .sw.own { background: var(--own); } .chip .sw.none { background: transparent; border: 1.5px dashed var(--mut); } .chip .sw.fill { background: transparent; border: 2px dotted var(--acc); }

/* marks */
.mk { display: inline-flex; align-items: center; gap: 3px; font: 500 12px/1 var(--f-cond); letter-spacing: 0.03em; color: var(--ink2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; white-space: nowrap; background: var(--card); }
.mk b { font: 600 12px/1 var(--f-mono); color: var(--ink); }
.mk.warn { background: var(--warn-wash); border-color: transparent; }
.mks { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* numbers */
.big { font: 500 clamp(34px, 4.4vw, 52px)/1.05 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.bigunit { color: var(--ink2); font-size: 14px; }
/* step 27: the start page's big number opens its fact card, and a line under it opens the caveats */
button.big { justify-self: start; border: 0; background: transparent; padding: 0; text-align: left; border-radius: 4px; text-decoration: underline dotted var(--line); text-decoration-thickness: 2px; text-underline-offset: 7px; }
button.big:hover { text-decoration-color: var(--acc); }
.bigcard { justify-self: start; margin-top: var(--sp-1); }
.seg.heads { justify-self: start; margin-bottom: var(--sp-2); }   /* step 28: the case's main numbers */
.seg.heads[hidden] { display: none; }
.mid { font: 500 24px/1.15 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.flash { animation: flash 0.6s ease-out; }
@keyframes flash { from { color: var(--acc); } to { color: inherit; } }
.readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.readout > button.cell { text-align: left; border: 0; background: transparent; padding: 4px 10px 6px 0; border-right: 1px solid var(--line); margin-right: 10px; min-width: 0; }
.readout > button.cell:nth-of-type(3) { border-right: 0; margin-right: 0; }
.readout .lab { font: 500 12px/1.2 var(--f-cond); color: var(--mut); text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
/* step 27: a six-digit amount (the 3:12 case) fits a third of the readout from 861 px: the size follows the width */
/* step 30 (the viewing pass: Självfinansiering broke inside the word at 1000 px): a narrow cell writes its name without capitals and spacing */
.readout > button.cell { container-type: inline-size; }
@container (max-width: 140px) { .readout .lab { text-transform: none; letter-spacing: 0; } }
.readout .val { font: 500 clamp(19px, 2.2vw, 26px)/1.15 var(--f-mono); font-variant-numeric: tabular-nums; display: block; letter-spacing: -0.02em; }
.readout .unit { font-size: 12px; color: var(--mut); display: block; }

/* sliders */
.slider { display: grid; gap: 4px; min-width: 0; }
.slider .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.slider label, .slider .lbl { font: 500 13px var(--f-cond); color: var(--ink2); display: inline-flex; align-items: center; }
/* step 25: the question mark follows the label's last word, also when the label wraps (an inline-flex box put it at the far edge), and the value keeps its unit on its line */
.slider .head > .lbl { display: block; min-width: 0; }
.slider .head > .lbl > label { display: inline; }
.slider output { font: 500 15px var(--f-mono); white-space: nowrap; flex: none; }
.slider output.word { font: 500 13px var(--f-cond); color: var(--mut); }
input[type="range"] { width: 100%; accent-color: var(--acc); margin: 0; height: 28px; }
.ticks { position: relative; height: 18px; margin: 0 8px; }
.ticks button { position: absolute; top: 0; width: 14px; height: 18px; margin-left: -7px; border: 0; background: transparent; padding: 0; }
.ticks button::after { content: ""; position: absolute; left: 6px; top: 3px; width: 2px; height: 12px; background: var(--base); border-radius: 1px; }
.ticks button[aria-pressed="true"]::after { background: var(--acc); width: 3px; left: 5.5px; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--sunk); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; font: 500 13px var(--f-cond); letter-spacing: 0.02em; color: var(--ink2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
select { width: 100%; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; background: var(--card); font-size: 13px; }

/* control deck: every control on a wide screen, one at a time on a phone */
.deck { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 24px; }
.decktabs { display: none; }

/* charts */
svg { display: block; overflow: visible; }
svg text { fill: var(--ink2); font: 12px var(--f-sans); }
svg .tnum { font-family: var(--f-mono); }
svg text.halo { paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }   /* step 25: a line that crosses an axis's text does not cut it */
svg .grid { stroke: var(--grid); stroke-width: 1; }
svg .axis { stroke: var(--line); stroke-width: 1; }
svg .base { stroke: var(--base); stroke-width: 2; fill: none; stroke-linejoin: round; }
svg .prop { stroke: var(--acc); stroke-width: 2.5; fill: none; stroke-linejoin: round; }
svg .prop.own { stroke: var(--own); }
svg .prop.filled { stroke-dasharray: 6 4; }
svg .wash { fill: var(--acc-wash); stroke: none; }
svg .wash.own { fill: var(--own-wash); }
svg .hatch { fill: url(#hatch); }
svg .hatchline { stroke: var(--mut); stroke-width: 1; }
svg .bar { fill: var(--hist); }
svg .bar.pay { fill: var(--hist-pay); }
svg .bar.neg { fill: var(--own); }
svg .ghost { fill: none; stroke: var(--ink2); stroke-width: 1; stroke-dasharray: 2 2; }
svg .brk { stroke: var(--card); stroke-width: 3; fill: none; }
svg .cursor { stroke: var(--ink); stroke-width: 1; }
svg .grip { fill: var(--ink); }
svg .gript { fill: var(--card); font: 600 12px var(--f-mono); }
svg .handle { fill: var(--card); stroke: var(--acc); stroke-width: 2.5; cursor: grab; }
svg .handle.own { stroke: var(--own); }
svg .handle:hover, svg .handle.drag { fill: var(--acc); }
svg .lbl { fill: var(--ink); font: 500 12px var(--f-sans); }
svg .lblm { fill: var(--mut); font: 12px var(--f-sans); }
svg .lblp { fill: var(--acc); font: 600 12px var(--f-cond); }
svg .lblp.own { fill: var(--own); }
svg .lblb { fill: var(--base); font: 600 12px var(--f-cond); }
svg .dot { stroke: var(--card); stroke-width: 2; }
svg .ref { stroke: var(--mut); stroke-width: 1; stroke-dasharray: 3 3; }
svg .hot { stroke: var(--acc); stroke-width: 1.5; fill: none; stroke-dasharray: 4 3; }
svg .ptitle { fill: var(--ink2); font: 600 12px var(--f-cond); letter-spacing: 0.04em; }
svg .anno { fill: var(--ink); font: 500 12px var(--f-mono); paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
svg .lead { stroke: var(--ink2); stroke-width: 1; }
svg .sep { fill: var(--sunk); stroke: none; }
svg .fcurve { fill: none; stroke: var(--base); stroke-width: 2; stroke-dasharray: 5 4; }
svg .fcurve.on { stroke: var(--acc); stroke-width: 2.5; stroke-dasharray: none; }
svg .lvl { stroke: var(--ink2); stroke-width: 1.2; stroke-dasharray: 6 3; }
/* step 17: series per year (the view type bana) and dead source addresses */
svg .bline { stroke: var(--acc); stroke-width: 2; } svg .bline.k1 { stroke: var(--ink2); } svg .bline.k2 { stroke: var(--own); }
svg .bline.base { stroke: var(--mut); stroke-dasharray: 5 4; } svg .bdot { fill: var(--acc); } svg .bdot.base { fill: var(--mut); }
svg .bobs { fill: var(--card); stroke: var(--ink); stroke-width: 2; } .legend .bo { display: inline-block; width: 9px; height: 9px; border: 2px solid var(--ink); border-radius: 2px; transform: rotate(45deg); margin-right: 6px; vertical-align: middle; }
.legend .bl { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--acc); vertical-align: middle; margin-right: 6px; }
.legend .bl.k1 { border-top-color: var(--ink2); } .legend .bl.k2 { border-top-color: var(--own); } .legend .bl.base { border-top: 2px dashed var(--mut); }
.deadlink { color: var(--mut); overflow-wrap: anywhere; }
/* step 22: a chip that does not fit wraps its words, never cut */
.chips .chip { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 260px; }
svg .pubpt { fill: var(--card); stroke: var(--ink); stroke-width: 2; cursor: pointer; }
.cap .sh { display: none; }
.crumb { justify-self: start; }
.cap { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font: 500 12px var(--f-cond); color: var(--mut); letter-spacing: 0.03em; margin-bottom: 4px; }
.cap .notag { margin-left: 8px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px var(--f-sans); color: var(--ink2); }
.chartbox { min-width: 0; width: 100%; overflow: hidden; position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }

/* swarm: points on one axis, dodged into lanes */
.sw-box { position: relative; min-width: 0; }
.sw-lane { position: relative; }
.pt { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 2px var(--card); border: 0; padding: 0; }
.pt::before { content: ""; position: absolute; inset: -7px; }
.pt.dia { border-radius: 2px; transform: rotate(45deg) scale(0.82); background: var(--s2); }
.pt.ring { background: var(--card); border: 2px solid var(--ink); }
.pt.hollow { background: var(--card); border: 2px solid var(--acc); }
.pt.mini { width: 8px; height: 8px; margin: -4px 0 0 -4px; box-shadow: 0 0 0 1.5px var(--card); }
.pt.mini.hollow { border-width: 1.5px; }
.pt.sel { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.pt:hover { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--acc); }
.pt .g { position: absolute; left: 13px; top: -3px; font: 600 12px var(--f-mono); color: var(--ink2); pointer-events: none; }
i.pt.lg { position: relative; display: inline-block; margin: 0; }
.sw-ref { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--mut); }
.sw-cur { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--ink); }
.sw-marks { position: relative; height: 16px; }
.sw-marks span { position: absolute; top: 1px; font: 500 12px var(--f-mono); white-space: nowrap; transform: translateX(4px); }
.sw-marks span.lft { transform: translateX(calc(-100% - 4px)); }
.sw-marks .c { color: var(--ink); } .sw-marks .r { color: var(--mut); }
.sw-ax { position: relative; height: 18px; border-top: 1px solid var(--line); margin-top: 4px; }
.sw-ax span { position: absolute; top: 3px; transform: translateX(-50%); font: 12px var(--f-mono); color: var(--mut); white-space: nowrap; }
.sw-ax span.l0 { transform: none; } .sw-ax span.r0 { transform: translateX(-100%); }
.sw-tip { margin-top: 6px; font-size: 13px; color: var(--ink2); min-height: 20px; }
.sw-tip b { font: 500 14px var(--f-mono); color: var(--ink); }
.sw-name { font: 600 12px var(--f-cond); text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); margin: 6px 0 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink2); align-items: center; }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.legend span > i { flex: none; }   /* step 25: a legend's swatch keeps its shape when the text wraps (a dot was squeezed to an oval) */

/* dot plot rows (parameters, comparator) */
.dp { display: grid; }
.dp .r { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); align-items: center; gap: 10px; min-height: 26px; border-top: 1px solid var(--grid); }
.dp .r:first-child { border-top: 0; }
.dp .r .l { font-size: 13px; line-height: 1.25; padding-block: 3px; min-width: 0; }
.dp .r .l button { border: 0; background: transparent; padding: 0; text-align: left; color: var(--ink); font: inherit; }
.dp .r .l .s { color: var(--mut); font-size: 12px; }
.dp .r.hl { background: var(--acc-wash); }
.trk { position: relative; height: 26px; min-width: 0; }
.trk .tk { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.trk .rf { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--ink); }
.trk .pt { top: 50%; }
.dp .ax { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); gap: 10px; }
.trk.axis { height: 18px; }
.trk .tl { position: absolute; top: 2px; transform: translateX(-50%); font: 12px var(--f-mono); color: var(--mut); white-space: nowrap; }
.trk .tl.l0 { transform: none; } .trk .tl.r0 { transform: translateX(-100%); }
.dec { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.decbar { height: 10px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.decbar i { display: block; height: 100%; background: var(--acc); border-radius: 0 3px 3px 0; }
.decbar i.neg { background: var(--own); }
/* step 28 (Love on app9: the income tax's Antagandena squeezed into a narrow column): a value column of auto width took
   the whole row when one value was a long text (an option's label of 174 characters) and left the names none; the names
   keep at least two fifths, a value wraps, and a long text value (.long) stands on its own line under its name */
.kv { display: grid; grid-template-columns: minmax(min(10em, 40%), 1fr) minmax(0, auto); gap: 4px 12px; font-size: 13px; }
.kv > div { min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(2n) { text-align: right; font-family: var(--f-mono); }
.kv > div.long { grid-column: 1 / -1; text-align: left; font-family: var(--f-sans); color: var(--ink2); padding: 0 0 4px 12px; }
.kv > div.word { font-family: var(--f-sans); }
.kv > div.mixed { font-family: var(--f-sans); }   /* step 25: the numbers inside are .tab, the words in the text's font */
.kv button { border: 0; background: transparent; padding: 0; text-align: left; color: var(--acc); font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cmp2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* fact card */
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: flex-end; background: var(--veil); }
.sheet[hidden] { display: none; }
.sheet .panel { width: min(520px, 100%); height: 100%; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.sheet .ph { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sheet .ph .seg { margin-right: auto; }
.sheet .pb { overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; }
.sheet .close { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 5px 10px; font: 500 13px var(--f-cond); }
.sheet .big { font-size: 36px; }
blockquote { margin: 0; padding: 10px 12px; border-left: 3px solid var(--acc); background: var(--sunk); font-size: 14px; }
ul.cav { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink2); display: grid; gap: 6px; }
.links { display: grid; gap: 6px; }
.links a { font-size: 14px; }
.lpref { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13px; }
.lpref button { border: 1px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 6px; padding: 3px 9px; font: 500 13px var(--f-cond); }
.lpref button[aria-pressed="true"] { border-color: var(--acc); color: var(--acc); }
.pop .lpref { margin-top: 10px; }
.pop .dl-links { display: grid; gap: 2px; }
.tosave { justify-self: start; }
@media (min-width: 761px) { .tosave { display: none; } }

/* start page */
.hero { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--sp-5) var(--sp-6); align-items: start; }
.hero .side { display: grid; gap: var(--sp-5); align-content: start; min-width: 0; }
.hero .pic { position: sticky; top: calc(var(--topH) + env(safe-area-inset-top, 0px) + 12px); min-width: 0; }
.answer { display: grid; gap: 2px; }
.layers { display: grid; border-top: 1px solid var(--line); }
.layer { border-bottom: 1px solid var(--line); }
.layer > .lh { width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 14px; gap: 8px; align-items: baseline; border: 0; background: transparent; padding: 11px 0; text-align: left; }
.layer > .lh .n { font: 500 12px var(--f-mono); color: var(--mut); }
.layer > .lh .t { font: 600 16px/1.25 var(--f-cond); color: var(--ink); }
.layer > .lh .v { font: 500 14px var(--f-mono); color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.layer.go-layer > .lh .v { font: 500 14px var(--f-cond); color: var(--mut); }   /* step 25: words ("sju platser") in the text's font */
.layer > .lh .c { color: var(--mut); transition: transform 0.15s; font-size: 12px; }
.layer > .lh[aria-expanded="true"] .c { transform: rotate(90deg); }
.layer > .lh[aria-expanded="true"] .t { color: var(--acc); }
.layer > .lb { padding: 0 0 16px 30px; display: grid; gap: 12px; min-width: 0; }
.layer > .lb[hidden] { display: none; }
.layer .one { margin: 0; color: var(--ink2); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.layer.go-layer > .lh .t { color: var(--acc); }
.more { margin-top: var(--sp-7); display: grid; gap: var(--sp-3); }
/* step 27: the about page and the line that leads to it */
.om { max-width: 680px; gap: var(--sp-3); }
.om h1 { margin: 0; }
.om h2 { margin: var(--sp-3) 0 0; font-size: 17px; }
.om p { margin: 0; font-size: 14px; line-height: 1.5; }
/* step 28: the senders' own numbers (senderNumbers() in 55_platser.js) */
.sendnums { gap: var(--sp-3); }
.sendgrp { display: grid; gap: 4px; }
.sendref { font: 600 13px var(--f-cond); color: var(--ink2); }
.sendrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2px 12px; align-items: baseline; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: var(--card); padding: var(--sp-2) var(--sp-3); color: var(--ink); font: 13px/1.4 var(--f-sans); cursor: pointer; }
.sendrow:hover { border-color: var(--acc); }
.sendrow .who { min-width: 0; overflow-wrap: anywhere; }
.sendrow .val { min-width: 0; overflow-wrap: anywhere; }
.sendrow.gap .val { font-size: 12px; }
@media (max-width: 520px) { .sendrow { grid-template-columns: minmax(0, 1fr); } }
.om p.omavs { font-style: italic; margin-top: var(--sp-3); }   /* step 28: Love's own words, in italics where Avsändare stood */
.omlic summary { font: 500 14px var(--f-cond); color: var(--ink2); cursor: pointer; }
.omlic pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 var(--f-mono); color: var(--ink2); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: var(--sp-3); margin: var(--sp-2) 0 0; }
.omfoot { margin-top: var(--sp-7); padding-top: var(--sp-3); border-top: 1px solid var(--line); font-size: 13px; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-4); }
.casecard { display: grid; gap: 10px; align-content: start; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 14px; min-width: 0; color: var(--ink); font: inherit; }
.casecard:hover { border-color: var(--ink2); }
.casecard .qq { font: 600 15px/1.3 var(--f-cond); text-wrap: balance; }
.casecard .foot { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-size: 12px; color: var(--mut); }
.minimark { font: 500 12px var(--f-cond); letter-spacing: 0.04em; color: var(--mut); text-transform: uppercase; white-space: nowrap; }

/* read view of a precomputed case */
.caseview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 20px 32px; align-items: start; }

/* the instrument */
.ins-head { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-4); align-items: center; margin-bottom: var(--sp-5); }
/* step 24: as many columns as fit, in rows of equal length (fitCols() in 55_platser.js sets --cols) */
.cols { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--sp-4); }
/* step 28: the carousel when the columns do not fit at their least width (fitCols() in 55_platser.js) */
.car-btn { display: none; }
.carwrap.car { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 8px; align-items: start; }
.carwrap.car > .car-btn { display: inline-flex; align-items: center; justify-content: center; align-self: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); font: 500 22px/1 var(--f-sans); cursor: pointer; box-shadow: var(--shadow); }
.carwrap.car > .car-btn:hover:not(:disabled) { border-color: var(--acc); color: var(--acc); }
.carwrap.car > .car-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.carwrap.car > .cols { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: auto; padding: 2px 0 8px; scrollbar-width: thin; }
.carwrap.car > .cols > .col { flex: 0 0 var(--colw, 260px); scroll-snap-align: start; }
.carwrap.car > .cols:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.col { display: grid; gap: 8px; align-content: start; text-align: left; }
.col .ch { display: grid; gap: 2px; min-height: 58px; }
.col .metric { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 6px; border-top: 1px solid var(--grid); padding-top: 5px; }
.col .metric > :last-child { margin-left: auto; }
.col h3 { overflow-wrap: break-word; }
.col .metric .k { font: 500 12px var(--f-cond); color: var(--mut); text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; }
.col .metric > button, .col .metric > .vv { border: 0; background: transparent; padding: 0; font: 500 16px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.col.sel { box-shadow: inset 0 3px 0 var(--acc); border-color: var(--acc); }
.col.own.sel { box-shadow: inset 0 3px 0 var(--own); border-color: var(--own); }
.col .pick { border: 0; background: transparent; padding: 0; text-align: left; color: var(--ink); }
.shared { margin-top: var(--sp-5); }
/* step 20: the reform's own values apart from the senders' estimates */
.grps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; align-items: start; }
.grps.stackgrps { grid-template-columns: minmax(0, 1fr); }
.grp { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: var(--sp-4); display: grid; gap: var(--sp-3); min-width: 0; align-content: start; }
.grp-reform { border-left: 4px solid var(--ink); }
.grp-skattning { background: var(--sunk); border-style: dashed; }
.grp-typfall { background: var(--sunk); }
.grp-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.grp-tag { font: 600 12px var(--f-cond); text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 4px; background: var(--ink); color: var(--card); }
.grp-skattning .grp-tag { background: var(--acc); color: var(--acc-ink); }
.grp-typfall .grp-tag { background: var(--base); color: var(--card); }
.grp-ovrigt .grp-tag { background: transparent; color: var(--mut); border: 1px solid var(--line); }
.grp-name { overflow-wrap: anywhere; }
.grp .kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.grp .kv > div:nth-child(2n) { overflow-wrap: anywhere; }
.grp-picks { display: grid; gap: 8px; }
.grp-pick { display: grid; gap: 2px; min-width: 0; }
.grp-go { justify-self: start; }
.grp-var > summary { cursor: pointer; font-size: 13px; line-height: 1.4; }
.grp-var[open] > summary { margin-bottom: var(--sp-3); }
.bigspan { margin: 2px 0 4px; }
.bigspan .num { font: 500 18px var(--f-mono); font-variant-numeric: tabular-nums; }
.spanstrip { margin-top: 12px; border-top: 1px solid var(--grid); padding-top: 8px; display: grid; gap: 4px; min-width: 0; }
.spanstrip:empty { display: none; }
.spanlink { justify-self: start; }
svg .spanband { fill: var(--acc-wash); stroke: var(--acc); stroke-width: 1; }
svg .spanband.on { fill: var(--acc); fill-opacity: 0.35; }
svg .spancur { fill: var(--ink); }
svg .spanpt { fill: var(--acc); opacity: 0.7; }
.two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.gr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 16px; align-items: start; }
.graph { min-width: 0; width: 100%; overflow: hidden; }
.graph svg .node rect { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.graph svg .node.sel rect { stroke: var(--acc); stroke-width: 2.5; }
.graph svg .node.out rect { fill: var(--sunk); }
.graph svg .node { cursor: pointer; }
.graph svg .node .nt { fill: var(--mut); font: 600 12px var(--f-cond); letter-spacing: 0.02em; text-transform: uppercase; }   /* step 25: 12 px, less spacing so the names still fit */
.graph svg .node .nv { fill: var(--ink); font: 500 19px var(--f-mono); }
.graph svg .node .nu { fill: var(--mut); font: 12px var(--f-sans); }
.graph svg .edge { stroke: var(--base); stroke-width: 1.5; fill: none; }
.graph svg .edge.live { stroke: var(--acc); }
.graph svg .arrow { fill: var(--base); }
.nodelist { display: none; }
.lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 16px; align-items: start; }
.tabbar { display: none; }

@media (max-width: 1180px) {
  .gr, .lab { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero, .caseview, .two { grid-template-columns: minmax(0, 1fr); }
  .hero .pic { position: static; }
}
@media (max-width: 760px) {
  :root { --tabH: 56px; }
  main { padding-block: 12px calc(40px + var(--tabH) + env(safe-area-inset-bottom, 0px)); }
  .top .wrap { min-height: 46px; padding-block: 6px; }
  .p-start main, .p-fall main { padding-bottom: 40px; }
  /* the start page: the picture stays in sight while the layers open */
  .hero { gap: 10px; }
  .hero .pic { position: sticky; top: calc(var(--topH) + env(safe-area-inset-top, 0px)); z-index: 3; background: var(--bg); padding-block: 4px 6px; margin-inline: -4px; padding-inline: 4px; }
  .hero .side { display: contents; }
  .hero h1 { order: -3; }
  .hero .chips, .hero .choice { order: -2; }
  .hero .pic { order: -1; }
  .layer > .lb { padding-left: 0; }
  .cases { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; scrollbar-width: thin; }
  .casecard { flex: 0 0 82%; scroll-snap-align: start; }
  .readout .val { font-size: 20px; }
  /* the instrument: places at the bottom, one control at a time, one column at a time */
  .places, .top .mini { display: none; }   /* step 28: no miniature on a phone; step 30: only the one in the top bar, the points of the case cards (.pt.mini) stay */
  .tabbar { display: grid; grid-template-columns: repeat(var(--places, 6), minmax(0, 1fr)); position: fixed; z-index: 8; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .tabbar button { border: 0; background: transparent; height: var(--tabH); font: 500 12px var(--f-cond); padding: 0 2px; color: var(--ink2); border-top: 2px solid transparent; }
  .tabbar button[aria-current="true"] { color: var(--ink); border-top-color: var(--acc); }
  .decktabs { display: flex; flex-wrap: wrap; gap: 2px; background: var(--sunk); border-radius: 8px; padding: 3px; }
  .decktabs button { border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; font: 500 13px var(--f-cond); color: var(--ink2); white-space: nowrap; }
  .decktabs button[aria-pressed="true"] { background: var(--card); color: var(--ink); }
  .deck { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .deck > .dk:not(.on) { display: none; }
  .cols { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 4px; scrollbar-width: none; }
  .cols > .col { flex: 0 0 88%; scroll-snap-align: center; }
  .stickpic { position: sticky; top: calc(var(--topH) + env(safe-area-inset-top, 0px)); z-index: 3; }
  .dp:not(.tight) .r, .dp:not(.tight) .ax { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dp.tight .r, .dp.tight .ax { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 8px; }
  .dp.tight .r .l .s, .dp.tight .r .l .tab { display: none; }
  .dp.tight .r .l { font-size: 12px; }
  .two > .stickpic { order: -1; }
  .ins-head { margin-bottom: 10px; }
  .cap .lg { display: none; } .cap .sh { display: inline; }
  .chip { padding: 5px 10px 5px 8px; font-size: 13px; }
  .cmp2 { grid-template-columns: minmax(0, 1fr); }
  .graph .gsvg { display: none; }
  .nodelist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .nodelist .card { padding: 8px 10px; }
}
@media (prefers-reduced-motion: no-preference) { .sheet .panel { animation: slide 0.18s ease-out; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } .layer > .lh .c { transition: none; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
/* step 15: the price in its parts, households, the case bar, own scenarios and Ny modell */
/* step 29: Karlsson and Grauers' cost per kWh (view type kwhkostnad, 46_kwh.js) */
svg .kp-bat, .kw.kp-bat { fill: var(--acc); background: var(--acc); }
svg .kp-own, .kw.kp-own { fill: var(--hist); background: var(--hist); }
svg .kp-pub, .kw.kp-pub { fill: var(--s2); background: var(--s2); }
svg .kp-lad, .kw.kp-lad { fill: var(--base); background: var(--base); }
svg .kwhdiesel { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; }
svg .kwhref { stroke: var(--own); stroke-width: 3; }
.kw { display: inline-block; width: 12px; height: 10px; border-radius: 2px; }
.kw.kwdiesel { width: 16px; height: 0; border-top: 2px dashed var(--ink); border-radius: 0; }
.kw.kwref { width: 3px; height: 14px; background: var(--own); border-radius: 1px; }
.kwhlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink2); align-items: center; }
.kwhlegend span { display: inline-flex; gap: 5px; align-items: center; }   /* step 29: its own class, so that tests and code that look for the picture's .legend find that one */
.kwhnums { display: grid; gap: 6px; }
.kwhrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2px 12px; align-items: baseline; font-size: 13px; }
.kwhrow .who, .kwhrow .val { min-width: 0; overflow-wrap: anywhere; }
.kwhrow strong { font: 600 14px var(--f-mono); }
.kwhctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-3) var(--sp-4); }
.kwhticks button.own::after { background: var(--ink); width: 3px; left: 5.5px; }
.kwhcav { font-size: 12px; } .kwhcav ul { margin: 2px 0 0; padding-left: 18px; }
@media (max-width: 520px) { .kwhrow { grid-template-columns: minmax(0, 1fr); } }
svg .pp-prod { fill: var(--hist); }
svg .pp-tax { fill: var(--acc); }
svg .pp-vat { fill: var(--s2); }
svg .pp-tax.chg { stroke: var(--ink); stroke-width: 1; }
svg .bar.sum { stroke: var(--ink); stroke-width: 1; }
/* step 21: the place Fördelning: the span over the population's variants, and the reforms side by side */
svg .fdw { stroke: var(--ink); stroke-width: 1.4; }
.legend i.fdwl { display: inline-block; width: 16px; height: 0; border-top: 1.4px solid var(--ink); vertical-align: middle; margin-right: 6px; }
svg .bar.k0 { fill: var(--hist-pay); }
svg .bar.k1, .legend i.fdk.k1 { fill: var(--s2); background: var(--s2); }
svg .bar.k2, .legend i.fdk.k2 { fill: var(--own); background: var(--own); }
svg .bar.k3, .legend i.fdk.k3 { fill: var(--warn); background: var(--warn); }
svg .bar.k4, .legend i.fdk.k4 { fill: var(--base); background: var(--base); }
svg .bar.k5, .legend i.fdk.k5 { fill: var(--ink); background: var(--ink); }
svg .bar.k6, .legend i.fdk.k6 { fill: var(--hist); background: var(--hist); }
.legend i.fdk { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--hist-pay); vertical-align: middle; margin-right: 6px; }
svg rect[data-group] { cursor: pointer; }
.fdgini > div:nth-child(even) { text-align: right; }
.tabbar.many button { font-size: 12px; letter-spacing: -0.02em; padding: 0 1px; }
svg .pubpt.calc { stroke: var(--acc); }
.hh { display: grid; gap: 2px; }
.hhr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 34%) auto; gap: 8px; align-items: center; border: 0; background: transparent; padding: 3px 0; text-align: left; font-size: 13px; color: var(--ink); border-top: 1px solid var(--grid); }
.hhr .hl { min-width: 0; }
.hhr .hb { height: 10px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.hhr .hb i { display: block; height: 100%; background: var(--acc); }
.hhr .hb i.neg { background: var(--own); }
.hhr .hv { font-size: 13px; white-space: nowrap; }
.casebar { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.casebar > .ins-head { display: contents; }
.casebar > .ins-head > * { order: 2; }
.casebar > .newchip { order: 9; margin-left: auto; }
.chip.newchip { border-style: dashed; color: var(--acc); }
.casecard.newcard { border-style: dashed; }
.casecard.newcard .qq { color: var(--acc); }
.ny { max-width: 760px; }
.ny h1 { font-size: clamp(22px, 2.4vw, 28px); }
.ny + .ny { margin-top: 14px; }
.lbl { font: 500 13px var(--f-cond); color: var(--ink2); }
textarea, input[type="text"], input[type="url"] { width: 100%; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; background: var(--card); color: var(--ink); font: 14px/1.4 var(--f-sans); }
textarea.code { font: 12px/1.4 var(--f-mono); resize: vertical; }
.errs { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; color: var(--ink); }
.errs code { font: 12px var(--f-mono); color: var(--ink2); background: var(--sunk); border-radius: 3px; padding: 0 3px; word-break: break-all; }
.ok, .bad { font: 600 14px var(--f-cond); padding: 6px 10px; border-radius: 6px; }
.ok { background: var(--acc-wash); }
.bad { background: var(--warn-wash); }
.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.tblwrap { overflow-x: auto; max-width: 100%; }
.ptab { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.ptab th { font: 600 12px var(--f-cond); text-transform: uppercase; letter-spacing: 0.04em; color: var(--mut); text-align: right; padding: 4px 6px; white-space: nowrap; }
.ptab th:first-child { text-align: left; }
.ptab td { border-top: 1px solid var(--grid); padding: 5px 6px; text-align: right; vertical-align: top; }
.ptab td:first-child { text-align: left; min-width: 150px; }
.ptab tr.hl td { background: var(--acc-wash); }
.scen { border-top: 1px solid var(--line); padding-top: 12px; }
/* step 22: one line that names the choice and opens a list (12_val.js) */
.pkwrap { position: relative; display: inline-flex; flex-direction: column; max-width: 100%; min-width: min(100%, 300px); }
.pk { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 5px 10px 6px 12px; color: var(--ink); min-width: 0; }
.pk:hover, .pkwrap.open .pk { border-color: var(--ink2); }
.pk-lab { grid-column: 1; font: 600 12px/1.3 var(--f-cond); text-transform: uppercase; letter-spacing: 0.07em; color: var(--mut); }
.pk-v { grid-column: 1; display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 2px 7px; font: 500 15px/1.3 var(--f-cond); min-width: 0; }
.pk-t { overflow-wrap: anywhere; min-width: 0; }
.pk-v .sw { margin-top: 6px; }
.pk-v .mks { flex: none; margin-top: 1px; }
.pk-chev { grid-column: 2; grid-row: 1 / span 2; color: var(--ink2); font-size: 13px; }
.pkwrap .sw, .pk-o .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); flex: none; }
.pkwrap .sw.base { background: var(--base); } .pkwrap .sw.own { background: var(--own); } .pkwrap .sw.none { background: transparent; border: 1.5px dashed var(--mut); } .pkwrap .sw.fill { background: transparent; border: 2px dotted var(--acc); }
.pk-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 35; }
.pk-pop[hidden] { display: none; }
.pk-panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: min(62vh, 480px); overflow: hidden; }
.pk-ph { display: none; }
.pk-q { margin: 8px 12px 4px; width: calc(100% - 24px); }   /* step 26 (tittpass 24): the search field begins where the options do */
.pk-list { overflow-y: auto; padding: 4px 0 6px; overscroll-behavior: contain; }
.pk-o { width: 100%; display: grid; grid-template-columns: 14px minmax(0, 1fr) 16px; gap: 8px; align-items: start; border: 0; background: transparent; padding: 7px 12px; text-align: left; color: var(--ink); font: inherit; }
.pk-o .sw { margin-top: 5px; }
/* step 24: the text in the middle column also when an alternative has no swatch (the cases), the tick in the last */
.pk-o > .sw { grid-column: 1; } .pk-o > .pk-ot { grid-column: 2; } .pk-o::after { grid-column: 3; grid-row: 1; }
.pk-o.in { padding-left: 24px; }
.pk-o:hover, .pk-o:focus-visible { background: var(--sunk); outline: none; }
.pk-o[aria-selected="true"] { background: var(--acc-wash); }
.pk-o[aria-selected="true"]::after { content: "✓"; color: var(--acc); font-weight: 600; }
.pk-ot { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; min-width: 0; }
.pk-o .pk-t { font: 500 14px/1.3 var(--f-cond); }
.pk-s { flex-basis: 100%; font-size: 12px; color: var(--mut); line-height: 1.3; }
.pk-g { font: 600 12px var(--f-cond); text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); padding: 8px 12px 2px; }
.pk-sep { height: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.pk-g[hidden], .pk-sep[hidden], .pk-o[hidden], .pk-none[hidden] { display: none; }
.pk-none { padding: 8px 12px; color: var(--mut); font-size: 13px; }
.grp-pick .pkwrap { min-width: 0; width: 100%; }
.grp-pick .pk { width: 100%; }
details.grp-ovrigt > summary { cursor: pointer; list-style: none; }
details.grp-ovrigt > summary::-webkit-details-marker { display: none; }
details.grp-ovrigt > summary::after { content: "›"; margin-left: auto; color: var(--mut); transition: transform 0.15s; }
details.grp-ovrigt[open] > summary::after { transform: rotate(90deg); }
details.grp-ovrigt > summary .sub { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 760px) {
  .pkwrap { display: flex; width: 100%; }
  .pk-pop { position: fixed; inset: 0; z-index: 35; background: var(--veil); display: flex; align-items: flex-end; width: auto !important; left: 0 !important; }
  .pk-panel { width: 100%; max-height: 78vh; border-radius: 14px 14px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .pk-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .pk-ph .close { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 5px 10px; font: 500 13px var(--f-cond); }
  .pk-o { padding: 10px 14px; }
  .pk-q { margin: 8px 14px 4px; width: calc(100% - 28px); }
  .pk-o.in { padding-left: 26px; }
  .casebar .pkwrap { flex: 1 1 220px; width: auto; min-width: 0; }
  /* step 25: on a phone the names in their own case, at 12 px, which fit at 400 px ("NETTONUVÄRDESKV / OT" broke inside the word); at 360 px a long word may still break */
  .readout .lab { font-size: 12px; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
  .casebar > .newchip { order: 1; margin-left: 0; }
}
@media (min-width: 761px) and (max-width: 1000px) { .places button { padding: 6px 7px; font-size: 13px; } }
/* step 24: the top bar of the start page fits a narrow phone (360 px) */
@media (max-width: 420px) {
  .top .wrap { gap: 6px 10px; }
  .brand { font-size: 15px; }
  .top .shortcut { padding: 4px 8px; font-size: 12px; letter-spacing: 0.01em; }
  .top .row { gap: 6px !important; }
}
/* step 30: the print view (#utskrift-case, 64_utskrift.js) and the link to it beside the fact card's */
.bigrow { gap: 4px 16px; margin-top: var(--sp-1); }
.bigrow .bigcard { margin-top: 0; }
.utskrift { max-width: 760px; gap: var(--sp-3); }
.utskrift h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.utskrift h2 { margin: var(--sp-3) 0 0; font-size: 16px; }
.utskrift .pr-case, .utskrift .pr-q { margin: 0; }
.utskrift .pr-kv { font-size: 14px; }
.pr-heads { display: grid; gap: var(--sp-3); }
.pr-head { display: grid; gap: 0; border-top: 1px solid var(--line); padding-top: var(--sp-2); }
.pr-lab { font: 600 13px var(--f-cond); color: var(--ink2); letter-spacing: 0.02em; }
.pr-val { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.pr-big { font: 500 26px/1.2 var(--f-mono); font-variant-numeric: tabular-nums; }
.pr-unit { font-size: 14px; color: var(--ink2); }
.pr-span { margin: 0; font-size: 13px; }
.pr-span .num { font-size: 14px; }
ul.pr-src { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink2); display: grid; gap: 6px; overflow-wrap: anywhere; }
.pr-links { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; }
.pr-date { font-size: 12px; margin-top: var(--sp-3); }
@media print {
  :root, :root:not(.print), :root[data-theme] {
    --bg: #ffffff; --card: #ffffff; --sunk: #f2f4f3; --ink: #000000; --ink2: #333b3a; --mut: #555f5d; --line: #c8cfcc; --grid: #e8ecea;
    --acc: #1f5fae; --acc-wash: rgba(31, 95, 174, 0.12); --warn: #7a5400; --warn-wash: rgba(237, 161, 0, 0.16); color-scheme: light;
  }
  body { background: #ffffff; font-size: 12pt; }
  body::before, .top, .tabbar, .omfoot, .sheet, .pop, .noprint { display: none !important; }
  main { padding: 0 !important; }
  .utskrift { max-width: none; }
  .utskrift .mk { border-color: var(--line); }
  .pr-head { break-inside: avoid; }
  .utskrift .pr-links a::after { content: " " attr(href); color: var(--mut); font-size: 9pt; }
}
