@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/schibsted-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/schibsted-grotesk-latin-800-normal.woff2") format("woff2"); }
:root {
  --mist: #e9eeec;
  --paper: #f7f9f8;
  --ink: #15232b;
  --slate: #56666f;
  --line: #c6d1cd;
  --fern: #2c6a4e;
  --fern-dark: #1f4d39;
  --kowhai: #f0b429;
  --c-tax: #2e3f49;
  --c-acc: #7c8e98;
  --c-ks: #3d8c86;
  --c-sl: #a9764a;
  --c-net: #f0b429;
  --measure: 68ch;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--fern-dark); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--kowhai); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 0.75rem; z-index: 10; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--mist); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: 0.05em; }
.brand b { color: var(--fern); font-weight: 800; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--fern); font-weight: 600; }

/* Page title */
.intro { padding: 2.75rem 0 1.25rem; }
.intro h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 0.75rem; max-width: 20ch; }
.lede { font-size: 1.2rem; color: var(--slate); max-width: 54ch; margin: 0; }

/* The sentence calculator */
.calc { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.25rem, 3vw, 2.25rem); margin: 1.25rem 0 2.5rem; }
.sentence { font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.75; letter-spacing: -0.01em; margin: 0; font-weight: 400; }
.sentence + .sentence { margin-top: 0.4rem; }
.field { display: inline-flex; align-items: baseline; border-bottom: 3px solid var(--fern); margin: 0 0.15em; }
.field:focus-within { border-bottom-color: var(--kowhai); }
.field .unit { font-weight: 600; color: var(--fern); }
.sentence input, .sentence select {
  font: inherit; font-weight: 700; color: var(--ink); background: transparent; border: 0; padding: 0 0.1em; margin: 0;
  border-radius: 0; min-width: 0;
}
.sentence input { width: var(--w, 6ch); }
@supports (field-sizing: content) { .sentence input { width: auto; min-width: 2ch; field-sizing: content; } .sentence select { field-sizing: content; padding-right: 1.1em; } }
.sentence input:focus, .sentence select:focus { outline: none; }
.sentence select { appearance: none; -webkit-appearance: none; padding-right: 0.9em; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--fern) 50%), linear-gradient(135deg, var(--fern) 50%, transparent 50%);
  background-position: calc(100% - 0.45em) 58%, calc(100% - 0.2em) 58%; background-size: 0.25em 0.25em; background-repeat: no-repeat; }
.options { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin: 1.25rem 0 0; padding: 1rem 0 0; border-top: 1px dashed var(--line); font-size: 1rem; }
.options label { display: inline-flex; gap: 0.5rem; align-items: center; cursor: pointer; }
.options input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--fern); }
.options select { font: inherit; padding: 0.25rem 0.4rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* Result */
.result { margin-top: 1.75rem; }
.answer { font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.4; margin: 0 0 1rem; }
.big { font-weight: 800; font-size: clamp(2.6rem, 7vw, 4.75rem); line-height: 1; letter-spacing: -0.035em; display: block; margin: 0.15rem 0 0.4rem; }
.big .hl { background: linear-gradient(transparent 62%, var(--kowhai) 62%, var(--kowhai) 92%, transparent 92%); padding: 0 0.05em; }
.note { color: var(--slate); font-size: 0.95rem; margin: 0.25rem 0 0; }

/* The dollar strip: where each dollar goes */
.strip { display: flex; height: 2.75rem; border-radius: 6px; overflow: hidden; margin: 1.25rem 0 0.6rem; border: 1px solid var(--ink); }
.strip span { display: block; height: 100%; transition: flex-grow 0.35s ease; min-width: 0; }
.strip .s-tax { background: var(--c-tax); }
.strip .s-acc { background: var(--c-acc); }
.strip .s-ks { background: var(--c-ks); }
.strip .s-sl { background: var(--c-sl); }
.strip .s-net { background: var(--c-net); }
.strip .s-gst { background: var(--c-tax); }
.key { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; list-style: none; padding: 0; margin: 0 0 1.25rem; font-size: 0.95rem; }
.key li { display: inline-flex; align-items: center; gap: 0.45rem; }
.key i { width: 0.85rem; height: 0.85rem; border-radius: 2px; display: inline-block; border: 1px solid rgba(21, 35, 43, 0.35); }
@media (prefers-reduced-motion: reduce) { .strip span { transition: none; } }

/* Tables */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
th, td { text-align: right; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { white-space: normal; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 600; color: var(--slate); border-bottom: 2px solid var(--ink); }
tr.total td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; }
tr.credit td { color: var(--fern-dark); }

/* Article */
.article { max-width: var(--measure); padding-bottom: 3rem; }
.article h2 { font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.2; margin: 2.5rem 0 0.75rem; }
.article h3 { font-size: 1.2rem; margin: 1.75rem 0 0.4rem; }
.article p, .article li { max-width: var(--measure); }
.article table { margin: 1rem 0 1.5rem; }
.checked { font-size: 0.95rem; color: var(--slate); border-left: 4px solid var(--kowhai); padding: 0.4rem 0 0.4rem 0.9rem; margin: 2rem 0; }
.sources li { margin-bottom: 0.35rem; }

/* Home directory */
.tools { list-style: none; margin: 0 0 3rem; padding: 0; border-top: 2px solid var(--ink); }
.tools li { border-bottom: 1px solid var(--line); }
.tools a { display: grid; grid-template-columns: minmax(12rem, 1fr) 2fr; gap: 0.25rem 2rem; padding: 1.1rem 0.25rem; color: var(--ink); text-decoration: none; }
.tools a:hover { background: var(--paper); }
.tools strong { font-size: 1.3rem; letter-spacing: -0.015em; }
.tools span { color: var(--slate); }
@media (max-width: 40rem) { .tools a { grid-template-columns: 1fr; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-size: 0.92rem; color: var(--slate); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 0.75rem; }
.site-foot a { color: var(--ink); }
.site-foot p { max-width: 70ch; margin: 0.4rem 0; }

.hidden { display: none !important; }
.tab-row { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; padding: 3px; margin-bottom: 1.25rem; gap: 2px; }
.tab-row button { font: inherit; font-size: 0.95rem; border: 0; background: transparent; padding: 0.35rem 0.95rem; border-radius: 999px; cursor: pointer; color: var(--ink); }
.tab-row button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Global site additions */
.subnav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.92rem; padding-top: 0.55rem; padding-bottom: 0.6rem; border-top: 1px solid var(--line); }
.subnav a { color: var(--slate); text-decoration: none; padding: 0.15rem 0; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--kowhai); font-weight: 600; }
h2.group { font-size: 1.5rem; letter-spacing: -0.02em; margin: 2.25rem 0 0.6rem; }
h2.group + .tools { margin-bottom: 0.5rem; }
.site-head .subnav { justify-content: flex-start; }
.crumbs { margin: 1.4rem 0 0; font-size: 0.9rem; color: var(--slate); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line); }
.crumbs a { color: var(--slate); }
.crumbs + .intro { padding-top: 1rem; }
.elsewhere { border-top: 2px solid var(--ink); padding-top: 0.5rem; margin-bottom: 3rem; }
.elsewhere h2 { font-size: 1.25rem; margin: 0.75rem 0 0.5rem; }
.elsewhere ul { margin: 0; padding-left: 1.1rem; columns: 2 16rem; }
