* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --px: 10px;
}

@media (min-width: 500px) {
  :root {
    --px: 20px;
  }
}

html {
  background: #f9fafb;
  color: #111827;
}

body {
  font-family: system-ui, sans-serif;
  background: #f9fafb;
  color: #111827;
  line-height: 1.5;
  font-size: 14px;
  padding-bottom: 30vh;
}

main {
  max-width: 800px;
  margin: 40px auto;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #111827;
}

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(249, 250, 251, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px var(--px);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name {
  font-size: 22px;
  font-weight: 700;
}

.nav-total {
  font-size: 22px;
  font-weight: 700;
}

.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--px);
}

h2 {
  font-size: 22px;
  margin-top: 32px;
  margin-bottom: 10px;
}

h3 {
  font-size: 19px;
  margin-top: 24px;
  margin-bottom: 8px;
}

button {
  cursor: pointer;
  padding: 2px 6px;
}

p {
  margin-bottom: 16px;
}

ul {
  margin-left: 19px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
}

.ticker-list {
  display: grid;
  gap: calc(var(--px) / 2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticker-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);

  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (min-width: 500px) {
  .ticker-card {
    padding: 12px;
  }
}

@media (min-width: 800px) {
  .ticker-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .ticker-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.ticker-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  line-height: 1;
}

.ticker-id {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
  color: #111827;
  text-decoration: none;
}

.ticker-id:hover {
  text-decoration: underline;
}

.ticker-calc {
  font-size: 12px;
  font-weight: 400;
  color: #111827;
  white-space: nowrap;
  text-align: right;
}

.positive,
.negative {
  display: inline;
  white-space: nowrap;
  font: inherit;
  font-weight: 600;
  text-align: right;
}

.ticker-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}

.ticker-bottom .positive,
.ticker-bottom .negative {
  font-size: 13px;
}

.currency {
  color: #9ca3af;
  font-weight: 400;
}

.positive {
  color: #16a34a;
}

.negative {
  color: #dc2626;
}

pre {
  display: block;
  padding: 14px;
  border: 2px solid #000;
  border-radius: 6px;
  background: #f7f7f7;
  font-size: 16px;
  word-break: break-all;
}

code {
  background-color: #eee;
  display: inline-block;
  padding: 0 5px;
  font-size: 0.9em;
}

.note {
  border-left: 4px solid #000;
  padding-left: 16px;
  margin: 24px 0;
}

main img {
  max-width: 100%;
  width: 360px;
  float: right;
  border-radius: 12px;
  margin-left: 10px;
}

.info {
  display: flex;
  gap: 6px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--px);
}

.info > * {
  opacity: 0.4;
  transition: all 0.2s ease;
}

.info a {
  color: inherit;
  text-decoration: none;
}

.info a:hover,
.info svg:hover {
  opacity: 1;
}

.deployment {
  display: inline-block;
  letter-spacing: 2px;
  padding: 1px;
  font-size: 7px;
  font-weight: bold;
  width: 24px;
  height: 24px;
  text-align: center;
  line-height: 1em;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: monospace;
}

.lucide-expand {
  cursor: pointer;
}

.period-label {
  font-size: 18px;
  font-weight: 500;
  color: #9ca3af;
  background: white;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: baseline;
}

.period-toggle {
  display: flex;
  gap: 2px;
  align-items: center;
}

.period-toggle button {
  background: none;
  border: 1px solid transparent;
  padding: 3px 6px;
  font-size: 12px;
  font-family: inherit;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 4px;
}

.period-toggle button:hover {
  background: #f3f4f6;
  color: #111827;
}

.period-toggle button.active {
  background: #e5e7eb;
  color: #111827;
}

svg.sparkline,
svg.trendline {
  display: block;
}

.disclaimer {
  text-align: center;
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 10px var(--px);
  max-width: 1400px;
  margin: 8px auto 0;
}

svg.sparkline .dot {
  opacity: 0;
  pointer-events: none;
}
svg.sparkline .val-label {
  opacity: 0;
  pointer-events: none;
}
svg.sparkline g:hover .hz {
  fill: rgba(0, 0, 0, 0.04);
}
svg.sparkline g:hover .dot {
  opacity: 1;
}
svg.sparkline g:hover .val-label {
  opacity: 1;
}
