/* Yan's usage bars stay the original personal teal. Seasonal themes change --accent. */
:root {
  --usage-yan: #1b7d8a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-resolved-theme="light"]) {
    --usage-yan: #71c4c2;
  }
}

html[data-resolved-theme="dark"] {
  --usage-yan: #71c4c2;
}

.report {
  width: min(72rem, calc(100% - 2.75rem));
  margin: 0 auto;
  padding: clamp(7.4rem, 13vh, 8.75rem) 0
    calc(var(--corner-pad) + (var(--social-size, 50px) * 2) + var(--social-gap, 0.55rem) + 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.report-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.15rem 2rem;
  padding: 0 0.15rem;
}

.report-hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 2.7rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0;
}

.usage-fresh {
  margin: 0;
  color: var(--muted, #8a7e72);
  font-size: 0.92rem;
}

.usage-fresh.is-stale {
  color: #b5543c;
}

.sheet {
  position: relative;
  isolation: isolate;
  --lg-filter: none;
  color: var(--fg);
  background-color: color-mix(in srgb, var(--panel-bg) 88%, var(--fg) 4%);
  border: 1px solid var(--panel-brd);
  border-radius: 22px;
  --sheet-x: 1.4rem;
  padding: 1.35rem var(--sheet-x) 1.3rem;
  margin: 0;
  box-shadow: 0 6px var(--lg-outer-shadow-blur, 24px) var(--lg-outer-shadow, rgba(0, 0, 0, 0.14));
  backdrop-filter: blur(14px) saturate(1.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.55);
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 var(--lg-shadow-blur, 20px) var(--lg-shadow-spread, -5px) var(--lg-shadow-color, rgba(255, 255, 255, 0.45));
  background-color: rgba(var(--lg-tint-rgb, 255, 255, 255), var(--lg-tint-opacity, 0.06));
  pointer-events: none;
}

.sheet.lg-refraction {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sheet.lg-refraction::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  backdrop-filter: var(--lg-filter);
  -webkit-backdrop-filter: var(--lg-filter);
  isolation: isolate;
  pointer-events: none;
}

html.lg-chrome .sheet.lg-static {
  transition: transform 0.3s var(--ease, ease);
}

html.lg-chrome .sheet.lg-static:hover {
  will-change: transform;
}

html.lg-chrome .sheet.lg-static.lg-refraction::after,
html.lg-chrome[data-resolved-theme="dark"] .sheet.lg-static.lg-refraction::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: auto;
  background: var(--lg-spec) center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  opacity: var(--lg-spec-opacity, 0.5);
}

@media (prefers-color-scheme: dark) {
  html.lg-chrome:not([data-resolved-theme="light"]) .sheet.lg-static.lg-refraction::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

.sheet.lg-fallback {
  background-color: rgba(var(--lg-tint-rgb, 255, 255, 255), var(--lg-fallback-tint, 0.2));
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
}

.sheet > * {
  position: relative;
  z-index: 2;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}

.choice button,
#load-more {
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.95rem;
  cursor: pointer;
}

.choice button[aria-pressed="true"] {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 12%, transparent);
}

.choice button[hidden] {
  display: none;
}

.sheet h2,
.split-title {
  margin: 0 0 0.95rem;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.split-title {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-align: left;
  cursor: pointer;
}

.split-title.is-on {
  color: var(--fg);
}

.split-title:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.note {
  margin: -0.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.sheet.has-limit {
  overflow: hidden;
}

.sheet.has-limit > #totals {
  position: relative;
  z-index: 1;
}

.limit-bar {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--use, 0) * 100%);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  pointer-events: none;
}

.limit-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.1rem;
}

.limit-num {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.limit-label {
  color: var(--muted);
  font-size: 1rem;
}

.limit-note {
  flex-basis: 100%;
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.range-field {
  display: inline-flex;
}

.range-field input {
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--fg);
  /* No placeholder, so the empty box keeps a faint fill to read as a box. */
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.95rem;
  width: 12.5rem;
  max-width: 52vw;
  outline: none;
}

/* Empty custom-date box stays small; it grows with the typed digits. */
#range-digits {
  box-sizing: content-box;
  width: 2.4rem;
  min-width: 2.4rem;
  max-width: min(52vw, 16ch);
  field-sizing: content;
}

@supports (field-sizing: content) {
  #range-digits {
    width: auto;
  }
}

.range-field input:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.range-field.is-on input {
  background: color-mix(in srgb, var(--fg) 12%, transparent);
}

.range-field input[aria-invalid="true"] {
  box-shadow: inset 0 0 0 2px #c0392b;
}

/* After Enter: MM - DD - YYYY  –  MM - DD - YYYY, one box each. */
.range-segments {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
}

.range-segments[hidden] {
  display: none;
}

.range-field.is-on .range-segments {
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}

.range-segments[aria-invalid="true"] {
  box-shadow: inset 0 0 0 2px #c0392b;
}

.range-segments input {
  width: 2.15rem;
  max-width: none;
  padding: 0.3rem 0.2rem;
  text-align: center;
  border-radius: 0.6rem;
}

.range-segments input.seg-year {
  width: 3.4rem;
}

.range-field.is-on .range-segments input {
  background: color-mix(in srgb, var(--fg) 12%, transparent);
}

.range-segments .seg-dash {
  color: var(--muted);
}

.range-segments .seg-to {
  color: var(--muted);
  font-weight: 650;
  margin: 0 0.45rem;
}

.range-hint {
  min-height: 1.1em;
  margin: -0.45rem 0 0.8rem 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.range-hint.is-bad {
  color: #c0392b;
}

/* Token view: one total. The four token types replace it only while the box is hovered or focused. */
.token-hero {
  min-height: 4.2rem;
  outline: none;
}

.token-hero .token-split {
  display: none;
  flex-basis: 100%;
}

.sheet:hover > .token-hero .token-total,
.token-hero:focus-visible .token-total {
  display: none;
}

.sheet:hover > .token-hero .token-split,
.token-hero:focus-visible .token-split {
  display: grid;
}

.token-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.1rem;
}

.totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem 1rem;
}

.total-num {
  display: block;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.total-label {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.days-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  min-height: 12.5rem;
  overflow-x: auto;
  padding: 0.2rem 0.1rem 0.15rem;
}

.day {
  flex: 1 0 1.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 1.7rem;
  max-width: 2.6rem;
}

.day-hit {
  flex: 1 0 auto;
  width: 100%;
  min-height: 0;
}

.col {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
}

.seg {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  flex: none;
  height: var(--h);
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 0;
  line-height: 0;
  font-size: 0;
  cursor: pointer;
  transition: opacity 0.16s var(--ease, ease), filter 0.16s var(--ease, ease);
}

.seg:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -2px;
}

.day.is-hot .seg {
  opacity: 0.42;
}

.day.is-hot .seg.is-hot,
.day.is-hot:not(:has(.seg.is-hot)) .seg {
  opacity: 1;
}

.day.is-hot .col {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 22%, transparent);
}

.day.is-hot .day-label {
  color: var(--fg);
}

.day-label {
  flex: none;
  margin-top: 0.45rem;
  height: 1em;
  max-width: 100%;
  font-size: 0.5rem;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-align: center;
}

.day-tip {
  --lg-filter: none;
  position: fixed;
  z-index: 70;
  width: max-content;
  max-width: min(16rem, calc(100vw - 1.25rem));
  padding: 0.5rem 0.65rem 0.45rem;
  border-radius: 16px;
  color: var(--fg);
  background-color: color-mix(in srgb, var(--panel-bg) 88%, var(--fg) 4%);
  border: 1px solid var(--panel-brd);
  box-shadow: 0 16px 36px var(--lg-outer-shadow, rgba(0, 0, 0, 0.22));
  backdrop-filter: blur(18px) saturate(1.65);
  -webkit-backdrop-filter: blur(18px) saturate(1.65);
  pointer-events: none;
  isolation: isolate;
  transform: none !important;
}

.day-tip.lg-refraction {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.day-tip.lg-refraction::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  backdrop-filter: var(--lg-filter);
  -webkit-backdrop-filter: var(--lg-filter);
  pointer-events: none;
}

html.lg-chrome .day-tip.lg-static.lg-refraction::after,
html.lg-chrome[data-resolved-theme="dark"] .day-tip.lg-static.lg-refraction::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--lg-spec) center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  opacity: var(--lg-spec-opacity, 0.5);
}

@media (prefers-color-scheme: dark) {
  html.lg-chrome:not([data-resolved-theme="light"]) .day-tip.lg-static.lg-refraction::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

.day-tip.lg-fallback {
  background-color: rgba(var(--lg-tint-rgb, 255, 255, 255), 0.28);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
}

.day-tip[hidden] {
  display: none;
}

.day-tip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 var(--lg-shadow-blur, 20px) var(--lg-shadow-spread, -5px) var(--lg-shadow-color, rgba(255, 255, 255, 0.45));
  background-color: rgba(var(--lg-tint-rgb, 255, 255, 255), var(--lg-tint-opacity, 0.06));
  pointer-events: none;
}

.day-tip > * {
  position: relative;
  z-index: 2;
}

.day-tip-total {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.day-tip-people {
  list-style: none;
  margin: 0.38rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.day-tip-people li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 0.45rem;
  row-gap: 0.08rem;
  align-items: center;
}

.day-tip-people li.is-hot {
  margin: 0 -0.4rem;
  padding: 0.28rem 0.4rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

.day-tip-people li.is-hot .day-tip-num {
  color: var(--fg);
}

.day-tip-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 16%, transparent);
}

.day-tip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
}

.day-tip-num {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.day-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: -0.2rem 0 0.85rem;
}

.day-legend[hidden] {
  display: none;
}

.day-legend-label {
  margin-right: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.day-key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.28rem 0.7rem 0.28rem 0.42rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  color: var(--fg);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
}

.day-key.is-on {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

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

.day-swatch {
  width: 0.72rem;
  height: 0.72rem;
}

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

.hbar {
  display: grid;
  grid-template-columns: minmax(6.5rem, 32%) 1fr auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 0.42rem 0.35rem;
  margin: 0 0 0.15rem;
  cursor: pointer;
}

.hbar:hover,
.hbar.is-preview {
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}

.hbar.is-on,
.hbar.is-on:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.hbar-name {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  font-size: 0.9rem;
}

.hbar-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.hbar-swatch,
.day-swatch {
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 16%, transparent);
}

.hbar-swatch {
  width: 0.55rem;
  height: 0.55rem;
}

.hbar-track {
  height: 0.55rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  overflow: hidden;
}

.hbar-fill {
  display: block;
  height: 100%;
  width: var(--pct);
  min-width: 2px;
  background: var(--swatch, var(--accent));
  border-radius: inherit;
}

.hbar-num {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 4.4rem;
  text-align: right;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.95rem;
}

#load-more {
  color: var(--fg);
  padding: 0.35rem 0.15rem;
}

#clear-filters {
  --lg-filter: none;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 0.85rem;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 6px var(--lg-outer-shadow-blur, 24px) var(--lg-outer-shadow, rgba(0, 0, 0, 0.16));
  transition:
    transform 0.3s var(--ease, ease),
    box-shadow 0.4s var(--ease, ease),
    opacity 0.26s var(--ease, ease);
  animation: clear-in 0.28s var(--ease, ease);
}

#clear-filters[hidden] {
  display: none !important;
}

#clear-filters > span {
  position: relative;
  z-index: 2;
}

#clear-filters::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 var(--lg-shadow-blur, 20px) var(--lg-shadow-spread, -5px) var(--lg-shadow-color, rgba(255, 255, 255, 0.45));
  background-color: rgba(var(--lg-tint-rgb, 255, 255, 255), var(--lg-tint-opacity, 0.06));
  pointer-events: none;
}

#clear-filters.lg-refraction {
  background: transparent;
}

#clear-filters.lg-refraction::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  backdrop-filter: var(--lg-filter);
  -webkit-backdrop-filter: var(--lg-filter);
  isolation: isolate;
  pointer-events: none;
}

#clear-filters.lg-fallback {
  background-color: rgba(var(--lg-tint-rgb, 255, 255, 255), var(--lg-fallback-tint, 0.2));
  backdrop-filter: blur(14px) saturate(1.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.55);
}

#clear-filters:hover:not(.is-leaving) {
  box-shadow: 0 10px 28px var(--lg-outer-shadow, rgba(0, 0, 0, 0.2));
}

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

#clear-filters.is-leaving {
  animation: none;
  opacity: 0;
  transform: scale(0.86) !important;
  pointer-events: none;
}

html.lg-chrome #clear-filters:hover:not(.is-leaving) {
  will-change: transform;
}

@media (prefers-color-scheme: dark) {
  html:not([data-resolved-theme="light"]) #clear-filters.lg-refraction::after {
    backdrop-filter: var(--lg-filter) brightness(0.92) saturate(1.15);
    -webkit-backdrop-filter: var(--lg-filter) brightness(0.92) saturate(1.15);
  }
}

html[data-resolved-theme="dark"] #clear-filters.lg-refraction::after {
  backdrop-filter: var(--lg-filter) brightness(0.92) saturate(1.15);
  -webkit-backdrop-filter: var(--lg-filter) brightness(0.92) saturate(1.15);
}

@media (prefers-reduced-motion: reduce) {
  #clear-filters,
  #clear-filters.is-leaving {
    animation: none;
    transition: none;
  }
}

@keyframes clear-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#load-more {
  margin-top: 0.55rem;
}

.thread + .thread {
  border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
}

.thread-toggle {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 0.85rem;
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 0.72rem 0.15rem;
  cursor: pointer;
}

.thread-bar {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  right: calc(var(--sheet-x) * -1);
  width: calc(var(--use, 0) * (100% + (var(--sheet-x) * 2)));
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  pointer-events: none;
}

.thread-name {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.thread-kind {
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--muted);
}

.thread-title::before {
  content: "·";
  margin: 0 0.45rem;
}

.thread-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.thread-num {
  color: var(--accent);
}

.thread-side span + span::before {
  content: "·";
  margin: 0 0.45rem;
  color: var(--muted);
}

.thread-mark {
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.2rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}

.thread-toggle[aria-expanded="true"] .thread-mark {
  transform: rotate(-135deg);
  margin-top: 0.25rem;
}

.thread-body {
  padding: 0 0.15rem 0.85rem;
}

.prompt {
  padding: 1.05rem 0.15rem 1.1rem;
  border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
}

.prompt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.prompt-meta span + span::before {
  content: "·";
  margin: 0 0.55rem;
}

.facet {
  border: 0;
  margin: 0 0 0.95rem;
  padding: 0;
  min-inline-size: 0;
}

.facet-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  width: 100%;
  padding: 0;
  margin: 0 0 0.45rem;
}

.facet-label,
.agents-toggle {
  padding: 0;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.facet-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  flex: 0 0 auto;
}

.facet-action {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--fg) 82%, transparent);
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  border: 0;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  cursor: pointer;
}

.facet-action:hover:not(:disabled) {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

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

.facet-action:disabled {
  opacity: 0.42;
  background: transparent;
  cursor: default;
}

.agents-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font: inherit;
  font-size: 0.72rem;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.agents-meta {
  font-variant-numeric: tabular-nums;
}

.agents-meta.is-on {
  color: var(--accent);
}

.agents-toggle .thread-mark {
  margin-left: 0.15rem;
  margin-right: 0;
}

.agents-toggle[aria-expanded="true"] .thread-mark {
  transform: rotate(-135deg);
  margin-top: 0.25rem;
}

.facet-agents {
  margin-bottom: 0.15rem;
}

.facet-agents .checks {
  margin: 0.15rem 0 0.35rem;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
}

.checks[hidden] {
  display: none;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  max-width: 100%;
  padding: 0.16rem 0.68rem 0.16rem 0.16rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
}

.check.is-on {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}

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

.check-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.check-host {
  flex: 0 0 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 3px var(--lg-outer-shadow-blur, 24px) var(--lg-outer-shadow, rgba(0, 0, 0, 0.18));
  pointer-events: none;
  overflow: visible;
}

.check-orb {
  --lg-filter: none;
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  isolation: isolate;
  position: relative;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  overflow: visible;
}

.check-orb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 var(--lg-shadow-blur, 20px) var(--lg-shadow-spread, -5px) var(--lg-shadow-color, rgba(255, 255, 255, 0.45));
  background-color: rgba(var(--lg-tint-rgb, 255, 255, 255), var(--lg-tint-opacity, 0.06));
  pointer-events: none;
}

.check-dot {
  position: absolute;
  inset: 28%;
  z-index: 2;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.15s var(--ease, ease), transform 0.15s var(--ease, ease);
}

.check-orb.is-checked .check-dot {
  opacity: 1;
  transform: scale(1);
}

.check-orb.lg-refraction {
  background: transparent;
}

.check-orb.lg-refraction::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  backdrop-filter: var(--lg-filter);
  -webkit-backdrop-filter: var(--lg-filter);
  isolation: isolate;
  pointer-events: none;
}

.check-orb.lg-fallback {
  background-color: rgba(var(--lg-tint-rgb, 255, 255, 255), var(--lg-fallback-tint, 0.2));
  backdrop-filter: blur(10px) saturate(1.5);
  -webkit-backdrop-filter: blur(10px) saturate(1.5);
}

@media (prefers-color-scheme: dark) {
  html:not([data-resolved-theme="light"]) .check-orb.lg-refraction::after {
    backdrop-filter: var(--lg-filter) brightness(0.92) saturate(1.15);
    -webkit-backdrop-filter: var(--lg-filter) brightness(0.92) saturate(1.15);
  }
}

html[data-resolved-theme="dark"] .check-orb.lg-refraction::after {
  backdrop-filter: var(--lg-filter) brightness(0.92) saturate(1.15);
  -webkit-backdrop-filter: var(--lg-filter) brightness(0.92) saturate(1.15);
}

.prompt-text,
.prompt-toggle {
  margin: 0 0 0.7rem;
  white-space: pre-wrap;
  line-height: 1.45;
}

.prompt-toggle {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.prompt-toggle.is-clamped {
  max-height: 2.9em;
  overflow: hidden;
}

.prompt-text.is-empty {
  color: var(--muted);
  font-style: italic;
}

.toks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  margin: 0;
}

.toks div {
  min-width: 4.8rem;
}

.toks dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.toks dd {
  margin: 0.08rem 0 0;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.calls {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.calls li + li {
  margin-top: 0.25rem;
}

@media (max-width: 720px) {
  .thread-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.15rem;
  }

  .thread-side {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .thread-mark {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 860px) {
  .totals,
  .split {
    grid-template-columns: 1fr;
  }

  .report {
    width: min(72rem, calc(100% - 1.4rem));
  }
}

/* Phones: the window pill wraps instead of running off the Filters card. */
@media (max-width: 560px) {
  .choice button {
    white-space: nowrap;
  }

  .range-choice {
    display: flex;
    flex-wrap: wrap;
    border-radius: 1.4rem;
  }

  .range-field {
    flex: 0 1 auto;
  }

  .range-field input {
    width: 100%;
    max-width: none;
  }

  #range-digits {
    width: 2.4rem;
    max-width: min(100%, 16ch);
  }

  @supports (field-sizing: content) {
    #range-digits {
      width: auto;
    }
  }
}
