/* Deadlock item ledger. One theme family (warm near-black or warm grey
   paper, following the system setting), one accent (soul teal) for
   interaction and positive results, slot colours only where they encode
   an item's shop slot. Shape rule: everything square except focus rings. */

@font-face {
  font-family: 'Big Shoulders';
  src: url('/assets/fonts/big-shoulders-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark light;
  --bg: #121110;
  --raise: #1b1917;
  --ink: #ede8df;
  --muted: #a69f94;
  --line: #2e2a26;
  --line-strong: #47413a;
  --accent: #5ed6c6;
  --accent-ink: #0b1f1c;
  --neg: #f2836f;
  --weapon: #f0a232;
  --vitality: #92c845;
  --spirit: #c796f5;
  --tile-weapon: #6b4206;
  --tile-vitality: #33500f;
  --tile-spirit: #4b2c69;
  --tile-glyph: #fbf6ec;

  --font-display: 'Big Shoulders', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
  --max: 1320px;

  --z-sticky: 10;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f1f0ec;
    --raise: #e7e5df;
    --ink: #1c1a17;
    --muted: #5b554d;
    --line: #d7d3cb;
    --line-strong: #b4ada2;
    --accent: #09695d;
    --accent-ink: #ffffff;
    --neg: #ad3726;
    --weapon: #8a5200;
    --vitality: #3d6312;
    --spirit: #6d3d9e;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

button,
summary,
select,
[role='tab'] {
  touch-action: manipulation;
}

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

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.5rem;
  z-index: calc(var(--z-sticky) + 1);
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
}

/* ------------------------------------------------------------ masthead */

.masthead {
  border-bottom: 4px double var(--line-strong);
  padding: max(0.75rem, env(safe-area-inset-top)) var(--gutter) 0.875rem;
}

.masthead__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem 2rem;
}

.brand__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.brand__status {
  margin: 0.375rem 0 0;
  color: var(--muted);
  font-size: var(--step--1);
  min-height: 1.5em;
}

.scope {
  display: grid;
  grid-template-columns: repeat(3, minmax(9rem, auto));
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.field__label {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
}

select,
input[type='search'] {
  font-size: 16px;
  min-height: 2.5rem;
  min-width: 0;
  width: 100%;
  padding: 0.375rem 0.625rem;
  background: var(--raise);
  border: 1px solid var(--line-strong);
  border-radius: 0;
}

select {
  appearance: none;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1rem) 55%, calc(100% - 0.7rem) 55%;
  background-size: 0.3rem 0.3rem;
  background-repeat: no-repeat;
}

input[type='search']::placeholder {
  color: var(--muted);
  opacity: 1;
}

select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ------------------------------------------------------------ tabs */

.tabs-wrap {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0 var(--gutter);
}

.tabs {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 0.25rem 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab {
  flex: none;
  min-height: 3rem;
  padding: 0.5rem 0 0.375rem;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1;
  letter-spacing: 0.005em;
  cursor: pointer;
}

.tab[aria-selected='true'] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------ panel */

main {
  flex: 1;
  padding: 1.25rem var(--gutter) 3rem;
}

main:focus {
  outline: none;
}

.panel {
  max-width: var(--max);
  margin: 0 auto;
}

.lede {
  margin: 0 0 1rem;
  max-width: 70ch;
  color: var(--muted);
  text-wrap: pretty;
}

.lede strong {
  color: var(--ink);
  font-weight: 600;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(12rem, 1.4fr) auto repeat(3, minmax(8.5rem, auto));
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.toolbar:empty {
  display: none;
}

.segmented {
  display: flex;
  border: 1px solid var(--line-strong);
  margin: 0;
  padding: 0;
  min-height: 2.5rem;
  min-width: 0;
}

.segmented legend {
  padding: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.75rem;
  min-height: 2.5rem;
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  border-left: 1px solid var(--line);
  user-select: none;
}

.segmented label:first-of-type {
  border-left: 0;
}

.segmented input:checked + label {
  background: var(--ink);
  color: var(--bg);
}

.segmented input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.swatch {
  width: 0.25rem;
  height: 1rem;
  background: currentColor;
  flex: none;
}

.swatch--weapon {
  color: var(--weapon);
}
.swatch--vitality {
  color: var(--vitality);
}
.swatch--spirit {
  color: var(--spirit);
}

.segmented input:checked + label .swatch {
  outline: 1px solid var(--bg);
}

.field--wide {
  grid-column: span 1;
}

/* ------------------------------------------------------------ notices */

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--neg);
  background: var(--raise);
}

.notice p {
  margin: 0;
  flex: 1 1 22rem;
}

.notice--info {
  border-left-color: var(--line-strong);
}

.button {
  min-height: 2.5rem;
  padding: 0.375rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 0;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms var(--ease-out);
  user-select: none;
}

.button--quiet {
  background: none;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.button:active {
  transform: scale(0.97);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ------------------------------------------------------------ ledger */

.ledger {
  border-top: 1px solid var(--line-strong);
}

.cols {
  display: grid;
  align-items: center;
  column-gap: 1rem;
}

.ledger--efficiency .cols {
  grid-template-columns: 2.75rem minmax(13rem, 1.5fr) minmax(9rem, 1.3fr) 5.5rem 6.5rem 6.5rem 7.5rem 1rem;
}

.ledger--effects .cols {
  grid-template-columns: 2.75rem minmax(12rem, 1.15fr) 7.5rem 7.5rem minmax(12rem, 1.6fr) 6.5rem 1rem;
}

.ledger--pairs .cols {
  grid-template-columns: 2.75rem minmax(18rem, 2.2fr) 6.5rem 5.5rem 5.5rem minmax(8rem, 1fr) 1rem;
}

.ledger__head {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 500;
}

.ledger__head .num,
.cell.num {
  text-align: right;
  justify-self: end;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2rem;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sort[aria-pressed='true'] {
  color: var(--ink);
  font-weight: 600;
}

.sort__dir {
  font-size: 0.75rem;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  border-bottom: 1px solid var(--line);
}

.skel-row {
  padding: 0.625rem 0.75rem;
  min-height: 3.5rem;
}

.row > details > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.625rem 0.75rem;
  min-height: 3.5rem;
}

.row > details > summary::-webkit-details-marker {
  display: none;
}

.row > details[open] > summary {
  background: var(--raise);
}

.rank {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1;
  color: var(--muted);
}

.row:nth-child(-n + 3) .rank {
  color: var(--ink);
}

.item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--tile-weapon);
  color: var(--tile-glyph);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
}

.tile--vitality {
  background: var(--tile-vitality);
}
.tile--spirit {
  background: var(--tile-spirit);
}

.tile img {
  width: 1.875rem;
  height: 1.875rem;
  display: block;
}

.item__text {
  min-width: 0;
}

.item__name {
  display: block;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-top: 0.125rem;
  color: var(--muted);
  font-size: var(--step--1);
}

.slot--weapon {
  color: var(--weapon);
}
.slot--vitality {
  color: var(--vitality);
}
.slot--spirit {
  color: var(--spirit);
}

.pips {
  display: inline-flex;
  gap: 2px;
}

.pip {
  width: 0.375rem;
  height: 0.625rem;
  border: 1px solid currentColor;
}

.pip--on {
  background: currentColor;
}

.badge {
  display: inline-block;
  padding: 0 0.375rem;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.4;
  white-space: nowrap;
}

.cell {
  min-width: 0;
}

.cell__label {
  display: none;
}

.big {
  font-weight: 600;
  font-size: var(--step-1);
}

.pos {
  color: var(--accent);
}

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

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

.thin {
  display: block;
  color: var(--muted);
  font-size: var(--step--1);
  white-space: nowrap;
}

/* Efficiency bar: no filled track, a tick marks 100 percent. */
.meter {
  display: grid;
  grid-template-columns: minmax(3rem, 1fr) 3.75rem;
  align-items: center;
  gap: 0.625rem;
}

.meter__bar {
  position: relative;
  height: 0.625rem;
}

.meter__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
}

.meter__tick {
  position: absolute;
  top: -0.25rem;
  bottom: -0.25rem;
  left: calc(100% / 1.5);
  width: 1px;
  background: var(--ink);
}

.meter__value {
  text-align: right;
  font-weight: 600;
  font-size: var(--step-1);
}

.chev {
  justify-self: end;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 160ms var(--ease-out);
}

details[open] > summary .chev {
  transform: rotate(45deg);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tag {
  display: inline-block;
  padding: 0 0.375rem;
  border: 1px solid var(--line-strong);
  font-size: var(--step--1);
  line-height: 1.5;
  white-space: nowrap;
}

.tag--rare {
  border-color: var(--accent);
  color: var(--ink);
}

.kind {
  font-size: var(--step--1);
}

.kind strong {
  display: block;
  font-size: var(--step-0);
  font-weight: 600;
}

.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.pair__plus {
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1;
}

/* Diverging bar for pair synergy and win-rate differences. */
.diverge {
  display: grid;
  grid-template-columns: 1fr 1fr 4.5rem;
  align-items: center;
  gap: 0;
}

.diverge__neg,
.diverge__pos {
  height: 0.625rem;
  position: relative;
}

.diverge__neg {
  border-right: 1px solid var(--ink);
}

.diverge__neg span,
.diverge__pos span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  transform: scaleX(var(--fill, 0));
}

.diverge__neg span {
  right: 0;
  background: var(--neg);
  transform-origin: right center;
}

.diverge__pos span {
  left: 0;
  background: var(--accent);
  transform-origin: left center;
}

.diverge__value {
  text-align: right;
  font-weight: 600;
}

/* ------------------------------------------------------------ details */

.detail {
  padding: 0.25rem 0.75rem 1.25rem calc(0.75rem + 2.75rem + 1rem);
  background: var(--raise);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1rem 2.5rem;
}

.detail h3 {
  margin: 0.75rem 0 0.375rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
}

.detail p {
  margin: 0 0 0.5rem;
  max-width: 68ch;
  text-wrap: pretty;
}

.detail .hl {
  font-weight: 600;
  color: var(--ink);
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 0;
}

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

.facts dd {
  margin: 0;
  text-align: right;
}

.breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.breakdown th,
.breakdown td {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-weight: 400;
}

.breakdown th:first-child,
.breakdown td:first-child {
  text-align: left;
  padding-right: 0.75rem;
}

.breakdown thead th {
  color: var(--muted);
  font-weight: 500;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.25rem 0 0.5rem;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--line-strong);
  font-size: var(--step--1);
}

.chips b {
  font-weight: 600;
}

/* ------------------------------------------------------------ states */

.more {
  display: flex;
  justify-content: center;
  padding: 1.25rem 0 0;
}

.empty {
  padding: 2.5rem 0.75rem;
  max-width: 60ch;
}

.empty h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1.1;
}

.empty p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.skeleton .bone {
  display: block;
  height: 0.875rem;
  background: var(--raise);
}

.skeleton .bone--tile {
  width: 2.5rem;
  height: 2.5rem;
}

.skeleton .bone--rank {
  width: 1.25rem;
  height: 1.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  .skeleton .bone {
    animation: breathe 1.4s ease-in-out infinite alternate;
  }
}

@keyframes breathe {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.45;
  }
}

/* ------------------------------------------------------------ method */

.method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 3rem;
}

.method section {
  min-width: 0;
}

.method h2 {
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1.1;
}

.method p,
.method li {
  max-width: 68ch;
  text-wrap: pretty;
}

.method ul {
  padding-left: 1.1rem;
}

.method .wide {
  grid-column: 1 / -1;
}

.prices {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.prices caption {
  text-align: left;
  color: var(--muted);
  padding-bottom: 0.5rem;
}

.prices th,
.prices td {
  padding: 0.4rem 0.75rem 0.4rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prices thead th {
  color: var(--muted);
  font-weight: 500;
  border-bottom-color: var(--line-strong);
}

.prices td.num,
.prices th.num {
  text-align: right;
}

.code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: var(--step--1);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ footer */

.foot {
  padding: 1.25rem var(--gutter) max(1.25rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}

.foot p {
  max-width: var(--max);
  margin: 0 auto;
}

.noscript {
  max-width: var(--max);
  margin: 2rem auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------ hover */

@media (hover: hover) and (pointer: fine) {
  .row > details > summary:hover {
    background: var(--raise);
  }
  .tab:hover {
    color: var(--ink);
  }
  .sort:hover {
    color: var(--ink);
  }
  .segmented label:hover {
    color: var(--ink);
  }
  .segmented input:checked + label:hover {
    color: var(--bg);
  }
  .button--quiet:hover {
    border-color: var(--ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chev,
  .button {
    transition: none;
  }
}

/* ------------------------------------------------------------ narrow */

@media (max-width: 1080px) {
  .toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .toolbar .field--search,
  .toolbar .segmented {
    grid-column: span 3;
  }
  .segmented label {
    flex: 1;
    justify-content: center;
  }
  .ledger--effects .cols {
    grid-template-columns: 2.75rem minmax(11rem, 1.2fr) 7rem 7rem minmax(10rem, 1.2fr) 6.5rem 1rem;
  }
  .ledger--efficiency .cols {
    grid-template-columns: 2.5rem minmax(11rem, 1.4fr) minmax(7rem, 1fr) 4.5rem 5.5rem 5.5rem 6.5rem 1rem;
  }
  .ledger--pairs .cols {
    grid-template-columns: 2.5rem minmax(14rem, 2fr) 5.5rem 4.5rem 5rem minmax(7rem, 1fr) 1rem;
  }
}

@media (max-width: 860px) {
  .masthead__inner {
    grid-template-columns: 1fr;
  }
  .scope {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .detail,
  .method {
    grid-template-columns: 1fr;
  }
}

/* Below 768px every ledger row becomes a two-part card: identity and the
   lead number on top, the remaining numbers in a labelled grid below. */
@media (max-width: 767px) {
  .ledger__head {
    display: none;
  }
  .skeleton .cols.skel-row {
    grid-template-columns: 2rem minmax(0, 1fr) 3.5rem;
    padding: 0.75rem;
  }
  .skeleton .cols.skel-row > :nth-child(n + 4) {
    display: none;
  }
  .row > details > summary.cols {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    grid-template-areas:
      'rank item lead'
      'rest rest rest';
    row-gap: 0.625rem;
    column-gap: 0.75rem;
    padding: 0.75rem;
  }
  .cols > .rank {
    grid-area: rank;
  }
  .cols > .item,
  .cols > .pair {
    grid-area: item;
  }
  .cols > .lead {
    grid-area: lead;
  }
  .cols > .chev {
    display: none;
  }
  .rest {
    grid-area: rest;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
  }
  .rest .cell {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    text-align: right;
  }
  .rest .cell__label {
    display: inline;
    color: var(--muted);
    font-size: var(--step--1);
    text-align: left;
  }
  .rest .cell--wide {
    grid-column: 1 / -1;
    display: block;
    text-align: left;
  }
  .rest .cell--wide .cell__label {
    display: block;
    margin-bottom: 0.25rem;
  }
  .lead .meter {
    grid-template-columns: 3.75rem;
  }
  .lead .meter__bar {
    display: none;
  }
  .lead .diverge {
    grid-template-columns: 4.5rem;
  }
  .lead .diverge__neg,
  .lead .diverge__pos {
    display: none;
  }
  .pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem;
  }
  .pair__plus {
    display: none;
  }
  .detail {
    padding: 0.25rem 0.75rem 1.25rem;
  }
  .scope {
    grid-template-columns: 1fr 1fr;
  }
  .scope .field:last-child {
    grid-column: span 2;
  }
  .toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .toolbar .field--search,
  .toolbar .segmented {
    grid-column: span 2;
  }
  .segmented label {
    padding: 0 0.5rem;
  }
  .tab {
    font-size: var(--step-1);
  }
  .tabs {
    gap: 1.25rem;
  }
}

@media (min-width: 768px) {
  .rest {
    display: contents;
  }
}
