@font-face {
  font-family: "Anybody";
  src: url("/assets/fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --paper: #eef0f3;
  --paper-deep: #e2e6eb;
  --card: #ffffff;
  --ink: #161b2b;
  --muted: #4b5568;
  --grid: #c9cfd8;
  --accent: #e85d04;
  --accent-text: #b33d00;
  --on-accent: #161b2b;
  --tint: rgba(232, 93, 4, 0.2);
  --blue: #2c55e0;
  --teal: #0c7a78;
  --violet: #5b3fd0;
  --dot: rgba(22, 27, 43, 0.11);
  --glow-a: rgba(44, 85, 224, 0.10);
  --glow-b: rgba(232, 93, 4, 0.08);
  --scrim: rgba(255, 255, 255, 0.78);

  
  --tool-sql: var(--blue);
  --tool-python: var(--teal);
  --tool-powerbi: var(--violet);

  --series-1: var(--blue);
  --series-2: var(--accent);

  --display: "Anybody", "Arial Narrow", Arial, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 76rem;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1d2335;
    --paper-deep: #252c42;
    --card: #2a324a;
    --ink: #eef1f7;
    --muted: #aeb8cc;
    --grid: #3b4560;
    --accent: #ff8a3d;
    --accent-text: #ffa060;
    --on-accent: #1d2335;
    --tint: rgba(255, 138, 61, 0.22);
    --blue: #8fb0ff;
    --teal: #4fd4ce;
    --violet: #b3a6ff;
    --dot: rgba(238, 241, 247, 0.08);
    --glow-a: rgba(143, 176, 255, 0.16);
    --glow-b: rgba(255, 138, 61, 0.10);
    --scrim: rgba(42, 50, 74, 0.82);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1d2335;
  --paper-deep: #252c42;
  --card: #2a324a;
  --ink: #eef1f7;
  --muted: #aeb8cc;
  --grid: #3b4560;
  --accent: #ff8a3d;
  --accent-text: #ffa060;
  --on-accent: #1d2335;
  --tint: rgba(255, 138, 61, 0.22);
  --blue: #8fb0ff;
  --teal: #4fd4ce;
  --violet: #b3a6ff;
  --dot: rgba(238, 241, 247, 0.08);
  --glow-a: rgba(143, 176, 255, 0.16);
  --glow-b: rgba(255, 138, 61, 0.10);
  --scrim: rgba(42, 50, 74, 0.82);
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #eef0f3;
  --paper-deep: #e2e6eb;
  --card: #ffffff;
  --ink: #161b2b;
  --muted: #4b5568;
  --grid: #c9cfd8;
  --accent: #e85d04;
  --accent-text: #b33d00;
  --on-accent: #161b2b;
  --tint: rgba(232, 93, 4, 0.2);
  --blue: #2c55e0;
  --teal: #0c7a78;
  --violet: #5b3fd0;
  --dot: rgba(22, 27, 43, 0.11);
  --glow-a: rgba(44, 85, 224, 0.10);
  --glow-b: rgba(232, 93, 4, 0.08);
  --scrim: rgba(255, 255, 255, 0.78);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-text);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.skip {
  position: absolute;
  left: var(--pad);
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 70%;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.8rem, 9vw, 7.5rem);
  line-height: 0.94;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-stretch: 80%;
}

h3 {
  font-size: 1.35rem;
  font-stretch: 85%;
  font-weight: 700;
}

p {
  margin: 0 0 1.1em;
  max-width: 38rem;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
}

.muted {
  color: var(--muted);
}

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover {
  color: var(--accent-text);
}

.site-head nav {
  display: flex;
  gap: 1.75rem;
}

.site-head nav a {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 90%;
  font-size: 1rem;
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.site-head nav a:hover {
  border-bottom-color: var(--grid);
  color: inherit;
}
.site-head nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
}

.site-foot {
  margin-top: clamp(4rem, 10vw, 8rem);
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--grid);
  color: var(--muted);
  font-size: 0.95rem;
}
.site-foot p {
  margin: 0;
  max-width: none;
}

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  padding-block: clamp(1.75rem, 4vw, 3.25rem) clamp(1.75rem, 4vw, 3rem);
}

.hero h1 {
  grid-column: 1 / span 8;
  grid-row: 1;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
}

.hero .lede {
  grid-column: 9 / span 4;
  grid-row: 1;
  align-self: end;
  margin: 0;
  font-size: 1.1rem;
}

.hero .lede,
.scrim,
.glance {
  padding: 1rem 1.2rem;
  background: var(--scrim);
  border: 1px solid var(--grid);
  border-radius: 0.5rem;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.plot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 0.5rem;
}

.axis-switch {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 600;
}

.axis-switch span {
  color: var(--muted);
}

.axis-switch button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0.2rem 0;
  cursor: pointer;
}
.axis-switch button:hover {
  border-bottom-color: var(--grid);
}
.axis-switch button[aria-pressed="true"] {
  border-bottom-color: var(--accent);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 500;
  font-size: 0.95rem;
}

.legend li::before,
.row-tool::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.45em;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.25s var(--ease);
}

.tool-sql {
  --tool: var(--tool-sql);
}
.tool-python {
  --tool: var(--tool-python);
}
.tool-powerbi {
  --tool: var(--tool-powerbi);
}

.legend li::before,
.row-tool::before {
  background: var(--tool);
}

#plot {
  position: relative;
}

#plot.narrow .mark .mark-title {
  opacity: 0;
  transition: opacity 0.2s;
}
#plot.narrow .mark.is-active .mark-title {
  opacity: 1;
}

#plot.settled .mark circle.dot {
  animation: none;
}

.axis-switch[hidden] {
  display: none;
}

#plot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.axis line {
  stroke: var(--grid);
  stroke-width: 1;
}
.axis .baseline {
  stroke: var(--ink);
  stroke-width: 1.5;
}
.axis text {
  fill: var(--muted);
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 500;
  font-size: 0.8rem;
}
.axis .axis-title {
  fill: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
}

.mark {
  cursor: pointer;
  transition: transform 0.7s var(--ease);
}

.mark circle.dot {
  fill: var(--tool);
  stroke: var(--paper);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: land 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 110ms + 150ms);
}

.mark circle.halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.2s;
}

.mark.is-active circle.halo {
  opacity: 1;
}

.mark text {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 700;
  font-size: 1rem;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.mark .mark-value {
  font-family: var(--text);
  font-weight: 400;
  font-stretch: 100%;
  font-style: italic;
  font-size: 0.85rem;
  fill: var(--muted);
  opacity: 0;
  transition: opacity 0.2s;
}
.mark.is-active .mark-value {
  opacity: 1;
}

@keyframes land {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.work-list {
  list-style: none;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0;
}

.work-list li {
  border-top: 1px solid var(--grid);
}
.work-list li:last-child {
  border-bottom: 1px solid var(--grid);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 2.5fr);
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding-block: 1.35rem;
  text-decoration: none;
}
.row:hover {
  color: inherit;
}

.row-title {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 75%;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.05;
  transition: color 0.2s;
}

.row-line {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
}
.row-meta time {
  color: var(--muted);
}

.work-list li.is-active .row-title {
  color: var(--accent-text);
}
.work-list li.is-active .row-tool::before {
  transform: scale(1.5);
}

.case-head {
  padding-block: clamp(1.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
}
.case-head h1 {
  font-size: clamp(2.4rem, 6.5vw, 5.25rem);
  max-width: 16ch;
}
.case-head .lede {
  margin-top: 1.5rem;
}

.case {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  align-items: start;
}

.case-meta {
  grid-column: 1 / span 3;
  position: sticky;
  top: 1.5rem;
  margin: 0;
  padding-top: 0.25rem;
  border-top: 3px solid var(--tool, var(--ink));
}
.case-meta dt {
  margin-top: 1.1rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 700;
  font-size: 0.95rem;
}
.case-meta dd {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.case-body {
  grid-column: 5 / span 8;
}
.case-body h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 2.75rem 0 1rem;
}
.case-body h2:first-child {
  margin-top: 0;
}

figure.plot {
  margin: 2rem 0 2.5rem;
}

figure.plot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  touch-action: pan-y;
}

figure.plot figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 38rem;
}

.series {
  fill: none;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.series.s1 {
  stroke: var(--series-1);
}
.series.s2 {
  stroke: var(--series-2);
}
.series.dashed {
  stroke-dasharray: 2 7;
}

.series-label {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 700;
  font-size: 0.95rem;
}
.series-label.s1 {
  fill: var(--series-1);
}
.series-label.s2 {
  fill: var(--series-2);
}

.cursor line {
  stroke: var(--ink);
  stroke-width: 1;
}
.cursor circle {
  stroke: var(--paper);
  stroke-width: 2;
}
.cursor circle.s1 {
  fill: var(--series-1);
}
.cursor circle.s2 {
  fill: var(--series-2);
}
.cursor text {
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 600;
  font-size: 0.85rem;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
  stroke-linejoin: round;
}

details.plot-data {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}
details.plot-data summary {
  cursor: pointer;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 600;
}
details.plot-data table {
  margin-top: 0.75rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
details.plot-data th,
details.plot-data td {
  padding: 0.25rem 1.25rem 0.25rem 0;
  text-align: left;
  border-bottom: 1px solid var(--grid);
}
details.plot-data .table-scroll {
  max-height: 16rem;
  overflow: auto;
}

.page-head {
  padding-block: clamp(1.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
}
.page-head h1 {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
}
.page-head .lede {
  margin-top: 1.5rem;
}

.page-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
}
.page-body > * {
  grid-column: 1 / span 7;
}
.page-body > .offset {
  grid-column: 6 / span 7;
}

.tool-table {
  margin: 0;
}
.tool-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: 0.25rem 2rem;
  padding-block: 0.9rem;
  border-top: 1px solid var(--grid);
}
.tool-table div:last-child {
  border-bottom: 1px solid var(--grid);
}
.tool-table dt {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 700;
  font-size: 1.25rem;
}
.tool-table dd {
  margin: 0;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.4rem;
  transition: background 0.2s;
}
.button:hover {
  background: var(--ink);
  color: var(--paper);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

.contact-actions .button {
  font-size: 1.15rem;
  padding: 0.85rem 1.6rem;
}

.email-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
  margin: 0;
  max-width: none;
}

.email-address {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 700;
  font-size: clamp(1.15rem, 4.6vw, 1.6rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.copy {
  padding: 0.35rem 0.9rem;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--grid);
  border-radius: 0.4rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.copy:hover {
  border-color: var(--accent);
}

.copy-status {
  min-width: 6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 52rem) {
  .hero h1,
  .hero .lede {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .hero .lede {
    margin-top: 1.5rem;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding-block: 1.1rem;
  }
  .row-meta {
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 1.25rem;
  }

  .case-meta {
    grid-column: 1 / -1;
    position: static;
    margin-bottom: 2.5rem;
  }
  .case-body {
    grid-column: 1 / -1;
  }

  .page-body > *,
  .page-body > .offset {
    grid-column: 1 / -1;
  }

  .tool-table div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 34rem) {
  .site-head nav {
    gap: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.plot-bar h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.plot-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2rem;
}

.page-body h2 {
  margin: 2.5rem 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.page-body h2:first-child {
  margin-top: 0;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--paper-deep);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

.page-body > .wide {
  grid-column: 1 / -1;
}

.compare {
  margin: 2rem 0 1rem;
}

.compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--grid);
}

.compare-stage {
  position: relative;
  min-width: 38rem;
}

.compare-pane {
  position: relative;
  background: var(--paper);
}
.compare-pane.raw {
  background: var(--paper-deep);
}

.compare-label {
  display: flex;
  align-items: center;
  height: 3rem;
  padding: 0 1rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 700;
}
.compare.is-live .compare-pane.processed .compare-label {
  justify-content: flex-end;
}

.compare table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.compare th,
.compare td {
  height: 2.6rem;
  padding: 0 1rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--grid);
  font-size: 0.95rem;
  line-height: 1.4;
}

.compare thead th {
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 700;
  font-size: 0.9rem;
}

.compare-pane.raw td {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.compare td.bad {
  text-decoration: underline wavy var(--accent-text);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
}

.compare td.chg {
  background: var(--tint);
  font-weight: 600;
}

.compare td.unknown {
  font-style: italic;
}

.compare tr.gone td {
  background: repeating-linear-gradient(135deg, transparent 0 6px, var(--grid) 6px 7px);
  color: var(--muted);
  font-style: italic;
}

.compare:not(.is-live) .compare-pane + .compare-pane {
  margin-top: 1.5rem;
  border-top: 1px solid var(--grid);
}

.compare.is-live .compare-stage {
  display: grid;
  --split: 40%;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}
.compare.is-live .compare-pane {
  grid-area: 1 / 1;
  min-width: 0;
}
.compare.is-live .compare-pane.processed {
  clip-path: inset(0 0 0 var(--split));
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2.75rem;
  margin-left: -1.375rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  touch-action: none;
}
.compare-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: var(--accent);
}
.compare-handle:focus-visible {
  outline: none;
}

.compare-grip {
  position: relative;
  margin-top: 5rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  border: 3px solid var(--paper);
  transition: transform 0.2s var(--ease);
}
.compare-grip svg {
  width: 1.4rem;
  height: 1.4rem;
}
.compare.dragging .compare-grip {
  transform: scale(1.1);
}
.compare-handle:focus-visible .compare-grip {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.compare-note {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 38rem;
}

.compare col.c1 { width: 17%; }
.compare col.c2 { width: 25%; }
.compare col.c3 { width: 19%; }
.compare col.c4 { width: 17%; }
.compare col.c5 { width: 22%; }

.fixes-title {
  margin: 2rem 0 0.75rem;
}

.page-body > .offset {
  margin-top: 3.5rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 6% -10%, var(--glow-a), transparent 70%),
    radial-gradient(46rem 32rem at 98% 0%, var(--glow-b), transparent 70%),
    radial-gradient(var(--dot) 1.1px, transparent 1.4px) 0 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 100%);
}

main {
  position: relative;
  isolation: isolate;
}

.scene {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(32rem, 80vh);
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 92%);
}
.scene.is-quiet {
  height: min(15rem, 40vh);
  opacity: 0.55;
}
.scene svg {
  display: block;
  width: 100%;
  height: 100%;
}
.scene .line {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.scene .l1 { stroke: var(--blue); opacity: 0.5; }
.scene .l2 { stroke: var(--teal); opacity: 0.45; }
.scene .l3 { stroke: var(--violet); opacity: 0.35; }
.scene .area { fill: var(--blue); opacity: 0.07; }
.scene .pt { fill: var(--muted); opacity: 0.4; }
.scene .hl { fill: var(--accent); }
.scene .ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  opacity: 0.75;
}

mark {
  background: var(--accent);
  color: var(--on-accent);
  padding: 0 0.12em;
  border-radius: 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark::selection,
mark ::selection {
  background: var(--ink);
  color: var(--paper);
}

.sr-only,
.compare.is-live .dash-source {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.compare.is-live .dash-source {
  top: 0;
  left: 0;
}

.dash {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}
.dash:empty {
  display: none;
}

.dash-head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}
.dash-head h4 {
  margin: 0;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.1;
}
.dash-head span {
  color: var(--muted);
  font-size: 0.85rem;
}

.dash-card {
  min-width: 0;
  padding: 0.8rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--grid);
  border-radius: 0.5rem;
}
.dash-card h5 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--muted);
}

.kpi {
  grid-column: span 3;
}
.kpi-value {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi-note {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}
.kpi.is-flag {
  border-top: 3px solid var(--accent);
}
.kpi.is-flag .kpi-value {
  color: var(--accent-text);
}

.chart {
  grid-column: span 4;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(3rem, 4.2rem) minmax(0, 1fr) 1.2rem;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.bar-track,
.bar-fill {
  display: block;
}
.bar-track {
  height: 0.85rem;
  background: var(--paper-deep);
  border-radius: 0.2rem;
  overflow: hidden;
}
.bar-fill {
  width: var(--w);
  height: 100%;
  background: var(--blue);
  border-radius: 0.2rem;
}
.bar-val {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.donut {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 1.3rem;
  border-radius: 50%;
  background: var(--card);
}
.donut-total {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 1.4rem;
}
.dash-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
}
.dash-legend li::before,
.q-legend li::before {
  content: "";
  display: inline-block;
  width: 0.65em;
  height: 0.65em;
  margin-right: 0.45em;
  border-radius: 0.15em;
  background: var(--c);
}
.dash-legend li {
  white-space: nowrap;
}

.cols {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 6.9rem;
}
.col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.col-val {
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.col-bar {
  width: 100%;
  height: var(--h);
  min-height: 2px;
  background: var(--blue);
  border-radius: 0.2rem 0.2rem 0 0;
}
.col-bar.is-unknown {
  background: repeating-linear-gradient(135deg, var(--muted) 0 3px, transparent 3px 6px);
  opacity: 0.7;
}
.col-name {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.quality {
  grid-column: 1 / -1;
}
.qbar {
  display: flex;
  gap: 2px;
  height: 1.1rem;
  margin: 0.2rem 0 0.7rem;
  border-radius: 0.25rem;
  overflow: hidden;
}
.qseg {
  flex: var(--n) 1 0;
  min-width: 4px;
  background: var(--c);
}
.qseg.is-same,
.q-legend li.is-same::before {
  opacity: 0.4;
}
.q-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}
.q-legend li strong {
  font-variant-numeric: tabular-nums;
}

.theme-test {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 50;
  padding: 0.55rem 0.9rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--grid);
  border-radius: 999px;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.theme-test:hover {
  border-color: var(--accent);
}

.tool-table dd strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-weight: 600;
}

.page-body > .offset > p {
  margin-bottom: 1.25rem;
}

.glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
  padding: 0.8rem 1.2rem;
}
.glance dt {
  margin-bottom: 0.25rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
}
.glance dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}
@media (max-width: 52rem) {
  .glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
