/* Brand primaryColor is TODO(product). Change this neutral accent token when chosen. */
:root {
  --accent: #43565a;
  --bg: #f5f5f1;
  --surface: #ffffff;
  --text: #202b2c;
  --muted: #536467;
  --line: #d6dedb;
  --danger: #b52d37;
  --focus: #17607a;
  /* INS-15–17 usage tokens (docs/design/insights.md). Tool hues sit between the
     sphere hues; autonomy is one ordinal ramp; dots mean "not measured". */
  --bar: #43565a;
  --nodata-dot: rgb(32 43 44 / .28);
  --tool-edit: #c16e2d; --tool-shell: #4c519c; --tool-read: #4faa7e; --tool-search: #913d71;
  --tool-web: #ada543; --tool-mcp: #00678e; --tool-subagent: #d0717f; --tool-other: #a5afb1;
  --auto-1: #8fbec3; --auto-2: #699ca2; --auto-3: #477a7f; --auto-4: #28555a;
  color-scheme: light;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
:root[data-theme="dark"] {
  --bg: #151b1d;
  --surface: #20282b;
  --text: #f0f4f2;
  --muted: #b3c2c4;
  --line: #48565a;
  --danger: #ff9ca2;
  --focus: #8ad2ed;
  --bar: #b3c2c4;
  --nodata-dot: rgb(240 244 242 / .30);
  --tool-edit: #d07c3d; --tool-shell: #6c6fc5; --tool-read: #4ea87c; --tool-search: #ab5489;
  --tool-web: #9f9733; --tool-mcp: #2b80ad; --tool-subagent: #d27380; --tool-other: #525b5e;
  --auto-1: #3b6267; --auto-2: #57858a; --auto-3: #7aa8ad; --auto-4: #a7ccd0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151b1d;
    --surface: #20282b;
    --text: #f0f4f2;
    --muted: #b3c2c4;
    --line: #48565a;
    --danger: #ff9ca2;
    --focus: #8ad2ed;
    --bar: #b3c2c4;
    --nodata-dot: rgb(240 244 242 / .30);
    --tool-edit: #d07c3d; --tool-shell: #6c6fc5; --tool-read: #4ea87c; --tool-search: #ab5489;
    --tool-web: #9f9733; --tool-mcp: #2b80ad; --tool-subagent: #d27380; --tool-other: #525b5e;
    --auto-1: #3b6267; --auto-2: #57858a; --auto-3: #7aa8ad; --auto-4: #a7ccd0;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button, input, select, textarea {
  font: inherit;
}
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button, select, input, textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: .48rem .75rem;
}
button:hover, a:hover {
  filter: brightness(.94);
}
button:disabled {
  opacity: .6;
  cursor: default;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: inherit;
}
h1, h2, h3, p {
  margin: 0 0 .7rem;
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.18;
  letter-spacing: -.04em;
  font-weight: 600;
}
h2 {
  font-size: 1.05rem;
  line-height: 1.4;
}
h3 {
  font-size: 1rem;
  margin-top: 1.4rem;
}
.eyebrow {
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 650;
}
.muted {
  color: var(--muted);
  font-size: .88rem;
}
.app-header {
  min-height: 84px;
  padding: 16px 3%;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  gap: .6rem;
  align-items: center;
  font-size: 1.23rem;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -.03em;
}
.brand-mark {
  font-size: 1.8rem;
}
.app-header nav {
  display: flex;
  gap: 1.7rem;
}
.app-header nav a {
  text-decoration: none;
  padding: .6rem 0;
  color: var(--muted);
}
.app-header nav a[aria-current] {
  border-bottom: 2px solid currentColor;
  color: var(--text);
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.theme-label {
  font-size: .82rem;
}
.theme-label select {
  margin-left: .3rem;
  padding: .35rem;
}
main {
  padding: 2.3rem 3%;
  max-width: 1800px;
  margin: auto;
}
footer {
  padding: 2rem 3%;
  color: var(--muted);
  font-size: .8rem;
  border-top: 1px solid var(--line);
}
.skip-link {
  position: absolute;
  left: -10000px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 1rem;
}
.week-heading {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.week-nav {
  display: flex;
  gap: .45rem;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.1rem 0 1.6rem;
}
.stats, .controls {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.stats span {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .9rem;
}
.stats strong {
  font-size: 1.2rem;
}
.controls {
  gap: .7rem;
  font-size: .82rem;
}
.red-dot {
  display: inline-block;
  background: var(--danger);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: .4rem;
  vertical-align: middle;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem;
}
.report {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  margin-bottom: 1.6rem;
}
.report dl {
  display: flex;
  gap: 2rem;
  margin: 0;
}
.report dl > div {
  flex: 1;
}
.report dt {
  font-weight: 650;
  margin-bottom: .5rem;
}
.report dd {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.week-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 1.5rem;
  align-items: start;
}
.grid-help {
  margin: 0 0 .8rem;
  font-size: .78rem;
}
.calendar-scroll {
  overflow: auto;
  max-height: 780px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  min-width: 840px;
  padding: 0 0 1rem 40px;
}
.day {
  min-width: 0;
  border-right: 1px solid var(--line);
}
.day:last-child {
  border: none;
}
.day-heading {
  margin: 0; padding: 9px 6px 7px; height: 82px;
  position: sticky; top: 0; z-index: 4;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.day-heading h2 { display: flex; align-items: baseline; gap: 4px; font-size: 13px; margin: 0; white-space: nowrap; }
.day-heading h2 span { color: var(--muted); font-weight: 400; }
.day-heading small { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; }
.day-heading p { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 5px 0 0; }
.project-mix { display: flex; gap: 1px; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 6px; background: var(--line); }
.day-track { position: relative; margin-right: 3px; }
.hour-line { position: absolute; width: calc(100% + 3px); border-top: 1px solid var(--line); pointer-events: none; }
.hour-line span { display: none; position: absolute; right: calc(100% + 5px); top: -8px; color: var(--muted); font-size: 10px; background: var(--surface); }
.day:first-child .hour-line span, .day.dst-day .hour-line span { display: block; }
.day.dst-day .hour-line span { right: auto; left: 2px; top: 0; z-index: 2; }
.empty-hours { position: absolute; width: calc(100% + 3px); background: repeating-linear-gradient(90deg, transparent 0 6px, var(--line) 6px 7px); border-block: 1px solid var(--line); }
.empty-hours span { display: none; position: relative; z-index: 2; background: var(--surface); color: var(--muted); font-size: 10px; white-space: nowrap; padding: 2px 4px; }
.day:first-child .empty-hours span { display: inline-block; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rail-swatch { font-style: normal; }
.project-tint { background: var(--span-light); color: var(--text); }
.project-span {
  position: absolute; border: 0; border-radius: 6px; padding: 0;
  text-align: left; overflow: hidden; min-width: 0;
  color: var(--text); font-size: 12px; line-height: 15px;
  box-shadow: inset 0 0 0 .5px var(--rail-light);
}
.project-span:hover { filter: none; outline: 1px solid var(--focus); }
.project-span:focus-visible { z-index: 3; outline: 2px solid var(--focus); outline-offset: 1px; }
.span-label { container: span-label / inline-size; display: flex; flex-direction: column; position: absolute; inset: 0 0 auto; padding: 3px 4px 0 10px; }
.span-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-name { display: block; font-size: 12px; font-weight: 600; line-height: 12px; }
.project-name > span { display: block; white-space: nowrap; }
.narrow-span .project-name { font-size: 11px; }
.span-label > span, .span-label small { font-size: 11px; line-height: 14px; }
/* WEB-2d: fit metadata to the label's available width, including chip clearance.
   The button's title/aria-label always retain the complete description. */
.span-label .span-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.span-label .span-summary-compact { display: none; text-overflow: clip; }
@container span-label (max-width: 115px) {
  .span-label .span-summary { display: none; }
  .span-label .span-summary-compact { display: block; }
}
@container span-label (max-width: 84px) {
  .span-label .span-time { display: none; }
}
@container span-label (max-width: 52px) {
  .span-label .span-summary-compact { display: none; }
}
.span-rail { position: absolute; inset: 0 auto 0 0; width: 8px; pointer-events: none; }
.span-rail i { position: absolute; left: 0; display: block; background: var(--rail-light); border-radius: 0 1.5px 1.5px 0; }
.span-dot { position: absolute; bottom: 5px; width: 7px; height: 7px; border-radius: 50%; background: #e0352b; box-shadow: 0 0 0 1.5px var(--span-light); }
.short-span .span-dot { bottom: auto; top: 5px; }
.short-span:has(.span-dot) .span-label { padding-right: 15px; }
.more-spans { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 2px 4px 2px 10px; display: flex; flex-direction: column; justify-content: start; }
.more-spans > strong { flex: none; }
.span-chip { z-index: 1; box-shadow: 0 0 0 1.5px var(--surface), inset 0 0 0 .5px var(--line); }
.segmented { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.segmented button { border: 0; background: transparent; padding: 4px 10px; font-size: 12px; }
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.sphere-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 2px 8px; background: var(--bg); font-size: 12px; }
.sphere-badge i { width: 8px; height: 8px; border-radius: 50%; }
.span-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; margin: 20px 0; }
.span-facts dt { color: var(--muted); }
.span-facts dd { margin: 0; }
.inspector-back { display: block; margin-bottom: 20px; }
:root[data-theme="dark"] .project-tint { background: var(--span-dark); }
:root[data-theme="dark"] .span-rail i { background: var(--rail-dark); }
:root[data-theme="dark"] .span-dot { background: #ff5a4f; box-shadow: 0 0 0 1.5px var(--span-dark); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .project-tint { background: var(--span-dark); }
  :root:not([data-theme="light"]) .span-rail i { background: var(--rail-dark); }
  :root:not([data-theme="light"]) .span-dot { background: #ff5a4f; box-shadow: 0 0 0 1.5px var(--span-dark); }
}
.week-sidebar {
  display: grid;
  gap: 1rem;
  padding-top: 2rem;
}
.big-number {
  font-size: 2.8rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.04em;
}
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.25rem 0;
}
.project-total {
  display: flex;
  align-items: start;
  gap: 1rem;
  justify-content: space-between;
  margin: .9rem 0;
  font-size: .85rem;
}
.project-total strong {
  white-space: nowrap;
}
.project-total > span {
  overflow-wrap: anywhere;
}
.swatch {
  display: inline-block;
  height: 10px;
  width: 10px;
  border: 1px solid #83918c;
  border-radius: 3px;
  margin-right: .5rem;
}
.bars {
  display: flex;
  gap: 4px;
  padding-top: .5rem;
  margin-bottom: .5rem;
}
.bar-column {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.bar-column > span {
  font-size: .75rem;
  white-space: nowrap;
}
.bar-space {
  height: 110px;
  display: flex;
  align-items: end;
  background: var(--bg);
  margin: .3rem 0;
  border-bottom: 1px solid var(--line);
}
.bar-space i {
  display: block;
  background: var(--accent);
  width: 100%;
  min-height: 1px;
  border-radius: 3px 3px 0 0;
}
.thread-link {
  display: flex;
  width: 100%;
  gap: .4rem;
  flex-direction: column;
  text-align: left;
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 1rem 0;
  overflow-wrap: anywhere;
}
.thread-link span {
  font-size: .8rem;
  color: var(--muted);
}
.detail {
  position: fixed;
  margin: 0 0 0 auto;
  inset: 0;
  height: 100dvh;
  max-height: 100dvh;
  width: min(560px, 100%);
  max-width: 100%;
  background: var(--surface);
  color: var(--text);
  padding: 3rem 2rem;
  border: none;
  border-left: 1px solid var(--line);
  overflow: auto;
  overflow-wrap: anywhere;
}
.detail::backdrop {
  background: #13202780;
}
.close {
  float: right;
  margin: -1.5rem -1rem 1rem 1rem;
}
.prose {
  white-space: pre-wrap;
}
li {
  margin-bottom: .5rem;
}
.empty {
  padding: 2.5rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.empty p {
  color: var(--muted);
}
.notice {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 1rem 0;
  background: var(--surface);
}
.settings-page {
  max-width: 780px;
  margin: 1rem auto;
}
.settings-page > p {
  margin: 1.3rem 0;
}
.settings-page .card {
  margin: 1.3rem 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}
th, td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
th {
  font-weight: 600;
}
form {
  display: grid;
  gap: 1rem;
}
form label {
  display: grid;
  gap: .5rem;
}
form input {
  width: 100%;
  padding: .7rem;
}
.danger {
  background: #a4212d;
  color: white;
  border-color: #a4212d;
}
.danger-zone {
  border-color: var(--danger);
}
.checkbox {
  display: flex;
  gap: .7rem;
  margin: .7rem 0;
  align-items: center;
}
.checkbox input {
  width: 18px;
  height: 18px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
}
.actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.signin {
  min-height: 65vh;
  max-width: 1000px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 5rem;
}
.signin h1 {
  font-size: clamp(3rem, 5vw, 4.8rem);
  margin: 1.3rem 0;
}
.signin-intro > p {
  max-width: 330px;
}
.signin-card {
  padding: 2rem;
}
.signin-card h2 {
  font-size: 1.3rem;
  margin-bottom: 1.6rem;
}
.signin-card > .muted {
  margin-top: 1.4rem;
}
.primary {
  background: var(--accent);
  color: white;
  padding: .7rem;
}
@media (max-width: 1150px) {
  .week-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .week-sidebar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding-top: 0;
  }
  .app-header {
    gap: 1.5rem;
  }
  .report {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}
@media (max-width: 650px) {
  main {
    padding: 1.5rem 1rem;
  }
  .app-header {
    padding: 1rem;
    gap: 1rem;
  }
  .app-header nav {
    order: 3;
    width: 100%;
    gap: 1.5rem;
  }
  .header-actions {
    gap: .5rem;
  }
  .theme-label {
    font-size: 0;
  }
  .theme-label select {
    font-size: .8rem;
  }
  .week-heading {
    align-items: start;
    flex-direction: column;
  }
  .stats {
    gap: .8rem;
  }
  .report dl {
    flex-direction: column;
    gap: 1rem;
  }
  .week-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
  .signin {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 1rem 0;
  }
  .signin h1 {
    font-size: 3.5rem;
  }
  .signin-card {
    padding: 1.5rem;
  }
  .actions {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
  }
}

.calendar-section, .week-sidebar, .week-sidebar .card {
  min-width: 0;
}

.token-value {
  display: block;
  width: 100%;
  margin: .5rem 0 1rem;
  min-height: 5rem;
  resize: vertical;
  overflow-wrap: anywhere;
}
.week-reports { margin-top: 2rem; }
.open-span-list { max-height: 360px; overflow-y: auto; }
.hour-line span { white-space: nowrap; }

/* ---------- Usage insights (INS-15–18, docs/design/insights.md) ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.nodata { background-color: var(--surface); background-image: radial-gradient(circle, var(--nodata-dot) .9px, transparent 1.1px); background-size: 4px 4px; }
:root .project-span.project-tint.no-usage { background-image: radial-gradient(circle, var(--nodata-dot) .9px, transparent 1.1px); background-size: 4px 4px; }
.toggle { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; font-size: 12px; background: var(--bg); }
.toggle[aria-pressed="true"] { background: var(--surface); box-shadow: 0 0 0 1px var(--line), inset 0 0 0 1px var(--line); }
.ramp-glyph { display: inline-flex; gap: 1px; align-items: end; }
.ramp-glyph i { width: 4px; height: 8px; background: var(--text); border-radius: 1px; }
.ramp-glyph i:nth-child(1) { opacity: .2; }
.ramp-glyph i:nth-child(2) { opacity: .4; }
.ramp-glyph i:nth-child(3) { opacity: .6; }
.ramp-glyph i:nth-child(4) { opacity: .8; }
.calendar-legend { align-items: center; }
.calendar-legend > span:has(.legend-swatch), .legend-scale { display: inline-flex; align-items: center; gap: 6px; }
.legend-scale .steps { display: inline-flex; gap: 3px; }
.legend-scale .steps > span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; line-height: 13px; font-variant-numeric: tabular-nums; }
.legend-scale .steps i { width: 26px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 .5px var(--line); }
.legend-swatch { width: 18px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--line); display: inline-block; }

.usage h3 { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--bg); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip em, .mix-row em { font-style: normal; color: var(--muted); }
.key-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.figure { font-size: 20px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.figure.unpriced { color: var(--muted); font-weight: 500; }
.caption { display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--muted); }
.info { width: 18px; height: 18px; padding: 0; border-radius: 50%; font-size: 11px; line-height: 1; color: var(--muted); background: transparent; display: inline-grid; place-items: center; position: relative; flex: none; anchor-name: var(--anchor); }
.info::after { content: ""; position: absolute; inset: -4px; }
.token-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 10px 0 0; border-top: 1px solid var(--line); margin: 0 0 20px; }
.token-cells div { font-size: 13px; line-height: 18px; }
.token-cells dt { color: var(--muted); font-size: 12px; }
.token-cells dd { margin: 0; font-variant-numeric: tabular-nums; }
.group { margin: 0 0 20px; }
.group-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 18px; color: var(--muted); margin-bottom: 6px; }
.group-label strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.turn-row { display: flex; align-items: center; gap: 10px; }
.turn-row .figure { font-size: 15px; line-height: 18px; }
.turn-strip { display: inline-flex; align-items: center; gap: 2px; height: 12px; }
.turn-strip b { width: 6px; height: 6px; border-radius: 50%; background: var(--text); margin-right: 4px; }
.turn-strip i { width: 2px; height: 9px; border-radius: 1px; background: var(--bar); opacity: .75; }
.turn-strip i.fade { opacity: .3; }
.turn-strip i.fade2 { opacity: .12; }
.sub { font-size: 12px; line-height: 16px; color: var(--muted); margin: 4px 0 0; }
.stack { display: flex; gap: 2px; height: 8px; margin: 0 0 8px; }
.stack i { display: block; min-width: 3px; height: 100%; }
.stack i:first-child { border-radius: 4px 0 0 4px; }
.stack i:last-child { border-radius: 0 4px 4px 0; }
.stack i:only-child { border-radius: 4px; flex: 1; }
.stack i.nodata { box-shadow: inset 0 0 0 1px var(--line); }
.tool-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 12px; margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 16px; }
.tool-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.tool-legend li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-legend li em { margin-left: auto; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.sw { width: 8px; height: 8px; border-radius: 2px; flex: none; display: inline-block; }
.sw.nodata { box-shadow: inset 0 0 0 1px var(--line); }
.autonomy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.autonomy p { margin: 0; font-size: 12px; line-height: 16px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 9px 0 7px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pips { display: inline-flex; gap: 2px; }
.pips i { width: 5px; height: 5px; border-radius: 1px; box-shadow: inset 0 0 0 1px var(--line); }
.pips.unknown i { box-shadow: none; outline: 1px dashed var(--muted); outline-offset: -1px; }
.meter { display: inline-block; width: 48px; height: 4px; border-radius: 2px; background: var(--line); vertical-align: middle; margin-left: 8px; position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--bar); border-radius: 2px; }
.not-recorded { color: var(--muted); }
.qual { color: var(--muted); font-size: 12px; font-weight: 400; }
.usage-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 16px; color: var(--muted); margin: 0 0 14px; }
.usage-note .sw { width: 10px; height: 10px; margin-top: 3px; }
.usage-facts { margin: 0; }
.span-facts dd { font-variant-numeric: tabular-nums; }

.how h2 { margin-bottom: 6px; }
.how h3 { font-size: 13px; font-weight: 600; margin: 0 0 2px; }
.how .sub { margin: 0 0 8px; }
.style-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.style-badge { height: 22px; padding: 0 9px; border-radius: 11px; background: var(--bg); color: var(--text); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.mix-row { margin: 0 0 8px; font-size: 13px; line-height: 18px; }
.mix-row > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.mix-row > div:first-child span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-row em { font-size: 12px; }
.mix-row strong { font-weight: 400; font-variant-numeric: tabular-nums; }
.mix-bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 3px; overflow: hidden; }
.mix-bar i { display: block; height: 100%; background: var(--bar); border-radius: 2px; }
.cost-row { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 13px; line-height: 18px; }
.cost-row > span { display: flex; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; }
.cost-row .swatch { margin-top: 4px; flex: none; }
.cost-row small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.cost-row strong { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.share-rows { display: grid; grid-template-columns: auto 1fr auto auto; gap: 4px 8px; align-items: center; font-size: 12px; line-height: 16px; }
.share-rows > div { display: contents; }
.share-rows em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.share-rows strong { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; min-width: 3ch; }
.how .how-facts { margin: 0; font-size: 13px; grid-template-columns: 1fr auto; gap: 8px 12px; }
.how .how-facts dd { text-align: right; white-space: nowrap; }
.how .how-facts .meter { width: 36px; }
.report-line-label { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.report-line { margin: 0 0 6px; padding-left: 10px; border-left: 2px solid var(--line); font-size: 13px; line-height: 19px; }
.sphere-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.usage-popover { width: 300px; max-width: calc(100vw - 24px); padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; line-height: 18px; box-shadow: 0 8px 28px rgb(0 0 0 / .14); overflow-wrap: normal; }
@supports (position-area: bottom) {
  .usage-popover { position-anchor: var(--anchor); position-area: bottom; margin: 6px 0 0; position-try-fallbacks: flip-block, bottom span-left, bottom span-right; }
}
.usage-popover h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.usage-popover p { margin: 0 0 10px; }
.usage-popover ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.usage-popover li { display: grid; grid-template-columns: 10px 1fr; gap: 8px; align-items: baseline; margin: 0; }
.usage-popover li i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--muted); display: inline-block; }
.usage-popover li[aria-current] i { background: var(--text); border-color: var(--text); }
.usage-popover li b { font-weight: 500; }
.usage-popover li[aria-current] b { font-weight: 600; }
.usage-popover footer { padding: 0; border: 0; font-size: 12px; line-height: 16px; color: var(--muted); }
@media (max-width: 1150px) {
  .report dl.with-how { flex-wrap: wrap; }
  .report dl.with-how > div { flex: 1 1 40%; }
}
@media (max-width: 650px) {
  .tool-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report dl.with-how { flex-wrap: nowrap; }
  .report dl.with-how > div { flex: none; }
}
