@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/MonaSans.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --background: #ffffff;
  --surface: #ffffff;
  --foreground: #000000;
  --muted: #666666;
  --border: #e5e5e5;
  --border-strong: #bdbdbd;
  --accent: #000000;
  --accent-foreground: #ffffff;
  --accent-soft: #eeeeee;
  --soft: var(--accent-soft);
  --success: #222222;
  --error: #4b4b4b;
  --shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 14px 36px rgb(0 0 0 / 4%);
  --header-background: #000000;
  --header-foreground: #ffffff;
  --radius: 0.7rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --background: #000000;
    --surface: #000000;
    --foreground: #ffffff;
    --muted: #a3a3a3;
    --border: #333333;
    --border-strong: #666666;
    --accent: #ffffff;
    --accent-foreground: #000000;
    --accent-soft: #222222;
    --soft: var(--accent-soft);
    --success: #e2e2e2;
    --error: #d2d2d2;
    --shadow: 0 1px 2px rgb(0 0 0 / 18%), 0 14px 36px rgb(0 0 0 / 18%);
    --header-background: #ffffff;
    --header-foreground: #000000;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #000000;
  --surface: #000000;
  --foreground: #ffffff;
  --muted: #a3a3a3;
  --border: #333333;
  --border-strong: #666666;
  --accent: #ffffff;
  --accent-foreground: #000000;
  --accent-soft: #222222;
  --soft: var(--accent-soft);
  --success: #e2e2e2;
  --error: #d2d2d2;
  --shadow: 0 1px 2px rgb(0 0 0 / 18%), 0 14px 36px rgb(0 0 0 / 18%);
  --header-background: #ffffff;
  --header-foreground: #000000;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html,
body {
  min-width: 320px;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  margin: 0;
  flex-direction: column;
  color: var(--foreground);
  background: var(--background);
  font-family: "Mona Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select { font: inherit; }

button,
select { cursor: pointer; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.container {
  width: min(100% - 2rem, 70rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.65rem 0.8rem;
  color: var(--accent-foreground);
  background: var(--accent);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 20;
  color: var(--header-foreground);
  background: var(--header-background);
}

.site-header__content,
.site-header__actions,
.section-heading,
.status,
.button,
.item-card__heading {
  display: flex;
  align-items: center;
}

.site-header__content {
  min-height: 3.5rem;
  justify-content: space-between;
}

.site-header__actions { gap: 0.8rem; }

.site-menu { position: relative; }

.site-menu__toggle svg {
  width: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.site-menu__panel {
  position: absolute;
  z-index: 30;
  display: grid;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 10.5rem;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-menu__panel[hidden] { display: none; }

.site-menu__panel a {
  display: block;
  padding: 0.62rem 0.85rem;
  border-radius: 0.4rem;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.site-menu__panel a:hover { background: var(--soft); }

.site-menu__group {
  display: grid;
  gap: 0.45rem;
}

.site-menu__child {
  position: relative;
  margin-left: 0.85rem;
  padding-left: 1.15rem !important;
  font-weight: 400 !important;
}

.site-menu__panel a[aria-current="page"] {
  color: var(--accent-foreground);
  background: var(--accent);
}

.wordmark {
  display: inline-block;
  border-radius: 0.35rem;
  color: inherit;
  font-family: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 1;
  text-decoration: none;
}

.wordmark:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.icon-button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  color: inherit;
  background: transparent;
}

.icon-button:hover { background: rgb(127 127 127 / 20%); }

.theme-toggle__icon {
  width: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-toggle__icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
:root[data-theme="dark"] .theme-toggle__icon--sun { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle__icon--moon { display: none; }
  :root:not([data-theme]) .theme-toggle__icon--sun { display: block; }
}

.site-main {
  flex: 1;
  padding: clamp(1rem, 2.5vw, 2rem) 0 5rem;
}

.site-main--centered {
  display: flex;
  align-items: center;
  padding: 1.5rem 0;
}

.site-main--landing {
  display: flex;
  align-items: flex-start;
  padding: calc(clamp(1rem, 2.5vw, 2rem) + clamp(1.5rem, 3vw, 2rem) + 1rem) 0 1.5rem;
}

.projects {
  width: 100%;
}

.project-card {
  display: grid;
  width: min(100%, 34.5rem);
  min-height: 20rem;
  place-items: center;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-card--progress {
  grid-template-rows: auto 1fr auto;
  place-items: stretch;
}

.project-card__number {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.project-card--progress .project-card__content {
  align-self: center;
  text-align: left;
}

.project-card h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.project-card--progress h1 {
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.project-card__content {
  text-align: center;
}

.project-card__status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.project-card__loading-bar {
  width: min(12rem, 60vw);
  height: 2px;
  overflow: hidden;
  margin: 5rem auto 0;
  background: var(--accent-soft);
}

.project-card--progress .project-card__loading-bar {
  align-self: end;
  margin: 0 0 0 auto;
}

.project-card__loading-bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  animation: loading-bar 2.4s ease-in-out infinite;
}

@keyframes loading-bar {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

.project-card__action {
  margin: 2rem 0 0;
}

.project-card__action a {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration-color: var(--border);
  text-underline-offset: 0.2em;
}

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

.tool-card {
  display: grid;
  min-height: 20rem;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.tool-card:hover {
  border-color: var(--border-strong);
}

.tool-card__number {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tool-card h2 {
  margin: clamp(2.5rem, 7vw, 5rem) 0 0.65rem;
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.tool-card p {
  max-width: 32ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.tool-card__arrow {
  justify-self: end;
  font-size: 1.5rem;
  line-height: 1;
}

.summary-card__label,
.field > span,
.item-card__metrics dt,
.item-card__details dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.25;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  max-width: 15ch;
  margin-bottom: 0.75rem;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.page-title {
  max-width: none;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.button {
  min-height: 2.75rem;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.button svg {
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button--primary {
  border-color: var(--accent);
  color: var(--accent-foreground);
  background: var(--accent);
}

.button--secondary {
  color: var(--foreground);
  background: var(--surface);
}

.button:hover { opacity: 0.82; }
.button:disabled { cursor: wait; opacity: 0.58; }
.button.is-refreshing svg { animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.summary-card,
.filter-panel,
.results {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-card {
  min-width: 0;
  padding: 1.15rem;
  border-radius: var(--radius);
}

.summary-card--link {
  display: block;
  color: inherit;
  box-shadow: none;
  text-decoration: none;
  transition: border-color 160ms ease;
}

.summary-card--link:hover {
  border-color: var(--border-strong);
  box-shadow: none;
  transform: none;
}

.summary-card strong {
  display: block;
  overflow: hidden;
  margin: 0.45rem 0 0.25rem;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-card__detail {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  min-height: 2.4rem;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.45rem 0.45rem 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--soft);
  font-size: 0.82rem;
}

.status__dot {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px rgb(127 127 127 / 14%);
}

.status[data-tone="success"] { color: var(--success); }
.status[data-tone="success"] .status__dot {
  background: #16803c;
  box-shadow: 0 0 0 3px rgb(22 128 60 / 16%);
}
.status[data-tone="error"] { color: var(--error); border-color: var(--border-strong); }
.status__message { min-width: 0; }

.status__actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.5rem;
  margin-left: auto;
}

.status__actions .button {
  min-height: 2.15rem;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.76rem;
}

.status__actions .text-button { margin-left: 0; }

.text-button {
  padding: 0.25rem;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: inherit;
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
}

.filter-panel,
.results { border-radius: var(--radius); }

.filter-panel {
  margin-bottom: 1.4rem;
  overflow: hidden;
}

.filter-panel--search { overflow: visible; }

.filter-panel__summary,
.filter-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.4rem;
  padding: 0.7rem clamp(0.85rem, 2vw, 1rem);
  cursor: pointer;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  list-style: none;
}

.filter-panel__heading {
  margin: 0;
  cursor: default;
}

.filter-panel__summary::-webkit-details-marker { display: none; }
.filter-panel__summary::marker { content: ""; }
.filter-panel__summary:hover { background: var(--soft); }
.filter-panel__summary:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: -4px;
}

.filter-panel__toggle {
  display: grid;
  width: 1.95rem;
  height: 1.95rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: transform 160ms ease;
}

.filter-panel__toggle svg {
  width: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.filter-panel[open] .filter-panel__toggle { transform: rotate(180deg); }

.filter-panel__content { padding: 0 clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.5rem); }

.filter-panel__actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.section-heading {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 1.12rem;
  letter-spacing: -0.035em;
}

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

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.4rem;
}

.field--search { grid-column: span 2; }

.field input,
.field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  color: var(--foreground);
  background: var(--background);
  font-size: 0.83rem;
}

.field input:hover,
.field select:hover { border-color: var(--border-strong); }

.input-unit { position: relative; }
.input-unit input { padding-right: 2.4rem; }
.input-unit span {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  color: var(--muted);
  font-size: 0.72rem;
  transform: translateY(-50%);
}

.results { overflow: hidden; }

.results__heading {
  margin: 0;
  min-height: 3.4rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}

.results__count {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

table {
  width: 100%;
  min-width: 60rem;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.flip-table { min-width: 78rem; }

th,
td {
  padding: 0.82rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

thead th {
  color: var(--muted);
  background: var(--soft);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

thead button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

thead button:hover { color: var(--foreground); }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: var(--soft); }
tbody th { max-width: 15rem; white-space: normal; }
tbody th strong { display: block; line-height: 1.25; }
tbody th span { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.66rem; font-weight: 500; }
.u-number { text-align: right; font-variant-numeric: tabular-nums; }
.u-profit { font-weight: 700; }

.item-value-link {
  border-radius: 0.15rem;
  color: inherit;
  font-weight: inherit;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.item-value-link:hover {
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

.loading-state {
  display: grid;
  gap: 0.65rem;
  padding: 1.4rem;
}

.loading-state[hidden],
.loading-state[aria-hidden="true"] { display: none; }

.loading-state span {
  height: 2.8rem;
  border-radius: 0.4rem;
  background: linear-gradient(90deg, var(--soft), var(--border), var(--soft));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state {
  padding: 3.5rem 1.4rem;
  text-align: center;
}

.empty-state strong { display: block; margin-bottom: 0.45rem; font-size: 1rem; }
.empty-state p { margin: 0 auto 1rem; color: var(--muted); font-size: 0.82rem; }

.mobile-results { display: none; }

.exchange-search {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.exchange-search .field--search { grid-column: auto; }

.exchange-search .button { min-width: 7rem; }

.exchange-search__control {
  position: relative;
  min-width: 0;
}

.exchange-search__results {
  position: absolute;
  z-index: 15;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  max-height: 18rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  list-style: none;
}

.exchange-search__results[hidden] { display: none; }

.exchange-search__option {
  padding: 0.65rem 0.75rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.exchange-search__option:hover,
.exchange-search__option[aria-selected="true"] {
  background: var(--soft);
}

.exchange-search__option strong,
.exchange-search__option span { display: block; }

.exchange-search__option strong {
  font-size: 0.82rem;
  line-height: 1.3;
}

.exchange-search__option span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.exchange-result[hidden] { display: none; }

.exchange-result__heading { margin-bottom: 1rem; }

.exchange-result__heading h2 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.045em;
}

.exchange-result__image {
  display: block;
  width: 4rem;
  height: 4rem;
  margin: 0.8rem 0;
  object-fit: contain;
  image-rendering: pixelated;
}

.exchange-result__image[hidden] { display: none; }

.exchange-result__meta,
.price-chart__context {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.price-chart {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.price-chart__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.price-chart__header h2 {
  margin-bottom: 0.25rem;
  font-size: 1.12rem;
  letter-spacing: -0.035em;
}

.price-chart__periods {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
}

.price-chart__period {
  min-width: 2.3rem;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 700;
}

.price-chart__period:hover {
  color: var(--foreground);
  background: var(--soft);
}

.price-chart__period[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent-foreground);
  background: var(--accent);
}

.price-chart__legend {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.8rem 1rem 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.price-chart__key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.price-chart__swatch {
  width: 1rem;
  height: 2px;
  background: var(--foreground);
}

.price-chart__swatch--low { opacity: 0.42; }

.price-chart__swatch--volume {
  width: 0.75rem;
  height: 0.5rem;
  opacity: 0.28;
}

.price-chart__plot {
  position: relative;
  min-height: 17rem;
  padding: 0.5rem 0.7rem 0;
}

.price-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 17rem;
  touch-action: pan-y;
}

.price-chart__svg[hidden] { display: none; }

.price-chart__hit-area {
  fill: transparent;
  cursor: crosshair;
}

.price-chart__grid line {
  stroke: var(--border);
  stroke-width: 1;
}

.price-chart__axis text {
  fill: var(--muted);
  font-family: inherit;
  font-size: 11px;
}

.price-chart__volume rect {
  fill: var(--foreground);
  opacity: 0.2;
}

.price-chart__line {
  fill: none;
  stroke: var(--foreground);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.price-chart__line--low {
  opacity: 0.42;
  stroke-width: 2;
}

.price-chart__hover { pointer-events: none; }

.price-chart__hover[hidden] { display: none; }

.price-chart__hover-line {
  stroke: var(--muted);
  stroke-dasharray: 3 4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.price-chart__dot {
  fill: var(--foreground);
  stroke: var(--background);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.price-chart__dot--low { fill: var(--muted); }

.price-chart__dot--volume {
  fill: var(--foreground);
  opacity: 0.65;
}

.price-chart__tooltip {
  position: absolute;
  z-index: 2;
  min-width: 10.5rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 0.45rem;
  color: var(--accent-foreground);
  background: var(--accent);
  box-shadow: var(--shadow);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.price-chart__tooltip[hidden] { display: none; }

.price-chart__tooltip-time {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}

.price-chart__tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.price-chart__tooltip-row + .price-chart__tooltip-row { margin-top: 0.3rem; }

.price-chart__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.price-chart__empty[hidden] { display: none; }

.site-footer {
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

@media (min-width: 40rem) {
  .container { width: min(100% - 3rem, 70rem); }
}

@media (max-width: 56rem) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--search { grid-column: span 2; }
  .exchange-search { grid-template-columns: minmax(0, 1fr) auto; }
  .exchange-search .field--search { grid-column: auto; }
}

@media (max-width: 43rem) {
  .site-main--landing {
    padding-top: calc(1rem + clamp(1.5rem, 3vw, 2rem) + 1rem);
  }

  .project-card--progress { min-height: 14rem; }
  .site-main { padding-top: 1rem; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card:last-child { grid-column: span 2; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .table-wrap { display: none; }
  .mobile-results { display: grid; }
  .mobile-results[hidden] { display: none; }
  .item-card {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .item-card:last-child { border-bottom: 0; }
  .item-card__heading { align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
  .item-card h3 { margin-bottom: 0.18rem; font-size: 0.92rem; letter-spacing: -0.025em; }
  .item-card__heading span { color: var(--muted); font-size: 0.66rem; }
  .item-card__profit { flex: 0 0 auto; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
  .item-card__metrics,
  .item-card__details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 1rem 0 0;
  }
  .item-card__metrics dt,
  .item-card__details dt { grid-row: 1; }
  .item-card__metrics dd,
  .item-card__details dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  details { margin-top: 0.9rem; }
  summary { color: var(--muted); cursor: pointer; font-size: 0.73rem; font-weight: 700; }
  .item-card__details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-card__details dt { grid-row: auto; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 14rem; }
  .tool-card h2 { margin-top: 2.5rem; }
  .price-chart__header { flex-direction: column; }
  .price-chart__periods { justify-content: flex-start; }
  .price-chart__svg { min-height: 14rem; }
}

@media (max-width: 31rem) {
  .container { width: min(100% - 1.25rem, 70rem); }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card:last-child { grid-column: auto; }
  .filter-grid { grid-template-columns: 1fr; }
  .field--search { grid-column: auto; }
  .exchange-search { grid-template-columns: 1fr; }
  .exchange-search .button { width: 100%; }
  .exchange-search__results {
    position: static;
    margin-top: 0.35rem;
  }
  .section-heading { align-items: flex-start; }
  .results__heading { align-items: flex-end; }
  .item-card__heading { flex-direction: column; gap: 0.4rem; }
  .item-card__metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .project-card__loading-bar span {
    animation: none;
    transform: translateX(75%);
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
