:root {
  color-scheme: light;
  --bg: #fff;
  --paper: #f7f8fa;
  --ink: #2f343f;
  --text: #2f343f;
  --muted: #7d8490;
  --line: #e2e5ec;
  --line-strong: #c9ced8;
  --accent: #faaf3a;
  --danger: #b42318;
  --warning: #9a6700;
  --good: #067647;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 14px/1.55 AvenirNext, "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
p, h1, h2, h3 { margin: 0; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px clamp(20px, 5vw, 68px);
  background: #fff;
  border-bottom: 1px solid rgba(226, 229, 236, .75);
}
.serenity-header { justify-content: space-between; }
.logo-link { display: block; flex: 0 0 auto; line-height: 0; }
.logo-link img { width: 148px; height: 72px; object-fit: contain; object-position: left center; }
.nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  flex: 1 1 auto;
  overflow: visible;
}
.nav-group {
  flex: 0 0 auto;
  position: relative;
  z-index: 30;
}
.nav-link {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.nav-trigger {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
}
.nav-trigger:focus { outline: none; }
.nav-trigger:after {
  content: "";
  display: inline-block;
  margin-left: 7px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
}
.nav-link.active,
.nav-group.active > .nav-link,
.nav-group:focus-within > .nav-link,
.nav-group:hover > .nav-link {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav-dropdown {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 35px rgba(47, 52, 63, .12);
  display: none;
  left: 0;
  min-width: 190px;
  padding: 10px 0;
  position: absolute;
  top: 100%;
  z-index: 20;
}
.nav-group:focus-within .nav-dropdown,
.nav-group:hover .nav-dropdown {
  display: block;
}
.nav-dropdown-link {
  color: var(--ink);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 10px 15px;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-dropdown-link.active,
.nav-dropdown-link:hover {
  background: #fff7e8;
  color: var(--accent);
}
.build-status { flex: 0 0 auto; text-align: right; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
.build-status strong { display: block; color: var(--ink); font-size: 12px; letter-spacing: 0; text-transform: none; margin-top: 3px; }
.eyebrow, .page-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  display: flex;
  align-items: center;
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  align-items: end;
  padding: 66px 0 74px;
  position: relative;
  z-index: 1;
}
.intro-heading { position: relative; padding-bottom: 28px; }
.intro-heading:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(520px, 68%);
  height: 3px;
  background: var(--accent);
}
h1, .hero-panel h2 {
  font-family: "Noe Display", Georgia, "Times New Roman", serif;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0;
  line-height: .98;
}
h1 { font-size: clamp(34px, 6vw, 66px); margin-top: 10px; max-width: 760px; }
.hero-copy { max-width: 620px; margin-top: 20px; color: #535b67; font-size: 16px; line-height: 1.62; }
.source-line { color: var(--muted); margin-top: 16px; }
.source-line strong { color: var(--ink); }
.objective-box { padding-bottom: 8px; }
.objective-box span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.objective-box strong {
  display: block;
  color: #3f5666;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
}
.decor-image {
  position: absolute;
  right: -95px;
  top: 130px;
  width: 240px;
  opacity: .45;
  pointer-events: none;
}
.visual-band {
  min-height: 220px;
  background-image: url("assets/serenity/bg-img-01-2x-1903x533.png");
  background-size: cover;
  background-position: center;
}
.home-section { padding: 54px 0 70px; }
.section-heading {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 28px;
  margin-bottom: 30px;
}
.section-heading h2 {
  font-family: "Noe Display", Georgia, "Times New Roman", serif;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}
.decor-link {
  position: relative;
  padding-left: 52px;
  color: var(--ink);
  font-size: 10px;
  line-height: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.decor-link:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.home-list {
  border-top: 1px solid var(--line);
}
.home-row {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  align-items: center;
  gap: 32px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background .2s ease, color .2s ease;
}
.home-row-title {
  color: var(--ink);
  font-family: "Noe Display", Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.1;
  font-weight: 700;
}
.home-row-desc { margin: 0; color: #69717c; line-height: 1.6; }
.home-row:hover { background: var(--ink); color: #fff; }
.home-row:hover .home-row-title, .home-row:hover .home-row-desc { color: #fff; }

.cadence-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.leverage-note {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--paper);
  color: #535b67;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  margin-top: 40px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: 40px;
  align-items: start;
}
.footer-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 600;
  width: fit-content;
}
.footer-link svg { flex: 0 0 auto; color: var(--muted); transition: color .2s ease; }
.footer-link:hover { color: var(--accent); }
.footer-link:hover svg { color: var(--accent); }
.footer-copy { color: var(--ink); font-weight: 800; letter-spacing: .04em; margin: 0 0 12px; }
.footer-disclaimer { color: var(--muted); font-size: 11px; line-height: 1.65; margin: 0; max-width: 760px; }
.page-shell { padding: 34px clamp(20px, 5vw, 68px) 70px; }
.hero-panel {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 36px;
  align-items: end;
  padding: 42px 0 34px;
  border-bottom: 1px solid var(--line);
}
.hero-panel:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(420px, 55%);
  height: 3px;
  background: var(--accent);
}
.hero-panel h2 { font-size: clamp(34px, 5.2vw, 62px); margin-top: 8px; max-width: 820px; }
.subtitle { color: #535b67; max-width: 720px; margin-top: 13px; font-size: 15px; line-height: 1.62; }
.metrics { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.metric {
  min-width: 98px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.metric span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.metric strong { display: block; color: var(--ink); font-size: 24px; line-height: 1.1; margin-top: 4px; }
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 28px 0 14px;
}
.search-box { display: block; width: min(540px, 100%); }
.search-box span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; margin-bottom: 7px; text-transform: uppercase; letter-spacing: .22em; }
.search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  padding: 0 13px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}
.search-box input:focus { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.toolbar-end { display: flex; align-items: end; gap: 16px; }
.filter-box { display: block; }
.filter-box > span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; margin-bottom: 7px; text-transform: uppercase; letter-spacing: .22em; }
.filter-box select {
  height: 44px;
  border: 1px solid var(--line-strong);
  padding: 0 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}
.filter-box select:focus { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.facets { display: flex; align-items: end; gap: 12px; }
.multi-select { position: relative; }
.multi-select summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 108px;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select summary::after { content: "\25be"; color: var(--muted); }
.multi-select[open] summary { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.multi-panel {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  right: 0;
  width: 212px;
  max-height: 272px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: 0 10px 26px rgba(16, 22, 32, .12);
}
.multi-actions { display: flex; gap: 6px; margin-bottom: 6px; }
.multi-actions button {
  flex: 1;
  height: 26px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  cursor: pointer;
}
.multi-actions button:hover { border-color: var(--accent); color: var(--text); }
.multi-option { display: flex; align-items: center; gap: 8px; padding: 5px 4px; cursor: pointer; font-size: 13px; }
.multi-option:hover { background: var(--paper); }
.multi-option span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-option em { color: var(--muted); font-style: normal; font-size: 11px; font-weight: 800; }
.row-count { color: var(--muted); font-weight: 800; padding-bottom: 10px; white-space: nowrap; }
.notes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.legend-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.legend-item { padding: 5px 9px; border: 1px solid var(--line); background: var(--paper); color: #535b67; font-size: 12px; }
.note { padding: 6px 9px; background: #fff7e8; color: #80591d; font-size: 12px; font-weight: 700; }
.table-frame {
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
}
table { width: 100%; min-width: 920px; border-collapse: collapse; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; background: #f5f6f8; }
td { color: #303845; }
td[data-column="market"] { max-width: 560px; }
tbody tr:nth-child(even) td { background: #fbfcfd; }
tbody tr:hover td { background: #fff8eb; }
tr:last-child td { border-bottom: 0; }
.th-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.sort-button span { color: var(--accent); }
.column-toggle {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1;
  padding: 5px 7px;
  text-transform: uppercase;
}
.column-toggle:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.euler-market-expanded th[data-column="market"],
.euler-market-expanded td[data-column="market"] {
  max-width: 320px;
  min-width: 240px;
  width: 28%;
}
.euler-market-expanded td[data-column="market"] {
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}
.euler-market-collapsed th[data-column="market"],
.euler-market-collapsed td[data-column="market"] {
  max-width: 88px;
  min-width: 88px;
  width: 88px;
}
.euler-market-collapsed td[data-column="market"] {
  overflow: hidden;
  text-overflow: ellipsis;
}
.euler-market-collapsed th[data-column="market"] {
  padding-left: 8px;
  padding-right: 8px;
}
.euler-market-collapsed th[data-column="market"] .th-controls {
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
}
.euler-market-collapsed th[data-column="market"] .sort-button {
  font-size: 9px;
  gap: 3px;
  letter-spacing: .04em;
}
.euler-market-collapsed th[data-column="market"] .column-toggle {
  display: inline-flex;
  font-size: 9px;
  justify-content: center;
  letter-spacing: .04em;
  padding: 4px 6px;
  width: 46px;
}
tr.danger td { background: #fff1f0; color: var(--danger); }
tr.warning td { background: #fff8e5; color: var(--warning); }
tr.good td:first-child { border-left: 4px solid var(--good); }
body[data-page="price"] .container { width: min(1440px, calc(100% - 28px)); }
body[data-page="price"] .page-shell { padding-left: clamp(12px, 2vw, 28px); padding-right: clamp(12px, 2vw, 28px); }
body[data-page="price"] .table-frame { overflow-x: visible; }
body[data-page="price"] table {
  font-size: 11px;
  min-width: 0;
  table-layout: fixed;
}
body[data-page="price"] th,
body[data-page="price"] td {
  padding: 7px 5px;
  white-space: nowrap;
}
body[data-page="price"] th { vertical-align: bottom; }
body[data-page="price"] td {
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-page="price"] .th-controls { display: flex; gap: 3px; }
body[data-page="price"] .sort-button {
  font-size: 9px;
  gap: 3px;
  letter-spacing: .04em;
  line-height: 1.1;
  min-height: 24px;
  white-space: normal;
}
body[data-page="price"] .sort-button span { flex: 0 0 auto; }
body[data-page="price"] th[data-column="stablecoin"],
body[data-page="price"] td[data-column="stablecoin"] { width: 10.5%; }
body[data-page="price"] th[data-column="chain"],
body[data-page="price"] td[data-column="chain"] { width: 5.6%; }
body[data-page="price"] th[data-column="quote-asset"],
body[data-page="price"] td[data-column="quote-asset"] { width: 4.6%; }
body[data-page="price"] th[data-column="updated"],
body[data-page="price"] td[data-column="updated"] { width: 3.8%; }
body[data-page="price"] th[data-column="liquidity-status"],
body[data-page="price"] td[data-column="liquidity-status"] { width: 6.7%; }
body[data-page="price"] th[data-column$="-price"],
body[data-page="price"] td[data-column$="-price"],
body[data-page="price"] th[data-column^="avg-mid"],
body[data-page="price"] td[data-column^="avg-mid"] {
  width: 5.3%;
  text-align: right;
}
body[data-page="price"] th[data-column$="-price"] .sort-button,
body[data-page="price"] th[data-column^="avg-mid"] .sort-button {
  justify-content: flex-end;
  text-align: right;
}
.empty, .error { padding: 16px; color: var(--muted); }
.error { margin-bottom: 12px; border: 1px solid #f2b8b5; background: #fff1f0; color: var(--danger); }
.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.tier-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: #fff;
}
.tier-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.tier-card h3 {
  font-family: "Noe Display", Georgia, "Times New Roman", serif;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}
.tier-card-head span {
  min-width: 34px;
  padding: 5px 8px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-weight: 800;
}
.tier-card p { color: #69717c; margin-bottom: 14px; }
.asset-list { display: flex; flex-wrap: wrap; gap: 7px; }
.asset-list span { padding: 5px 8px; border: 1px solid var(--line); background: #fffaf0; font-weight: 700; color: #303845; }
@media (max-width: 960px) {
  .site-header { display: block; }
  .nav { flex-wrap: wrap; justify-content: flex-start; margin-top: 18px; overflow: visible; padding-bottom: 8px; }
  .nav-dropdown { left: 0; position: absolute; top: 100%; }
  .build-status { text-align: left; margin-top: 12px; }
  .hero-layout { grid-template-columns: 1fr; gap: 30px; }
  .hero-panel, .toolbar { display: block; }
  .metrics { justify-content: flex-start; margin-top: 20px; }
  .toolbar-end { margin-top: 16px; flex-wrap: wrap; }
  .facets { flex-wrap: wrap; }
  .row-count { padding-top: 10px; }
  .tier-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 28px, 1180px); }
  .site-header { padding: 16px 14px; }
  .nav { gap: 14px; }
  .nav-link { font-size: 10px; }
  .home-row { grid-template-columns: 1fr; gap: 10px; padding: 22px 16px; }
  .visual-band { min-height: 150px; }
  .page-shell { padding: 20px 14px 48px; }
  table { min-width: 760px; }
  body[data-page="price"] .table-frame { overflow-x: auto; }
  body[data-page="price"] table { min-width: 1040px; }
}
