:root {
  font-family: Inter, system-ui, sans-serif;
  font-synthesis: none;
  color: #10203a;
  background: #f0f3f8;
  --muted: #536681;
  --border: #e5ebf4;
  --blue: #245bcc;
  --green: #08795f;
  --red: #b42a46;
}

* { box-sizing: border-box; }
body { margin: 0; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.shell { max-width: 970px; margin: 20px auto; width: calc(100% - 28px); border: 1px solid var(--border); border-radius: 21px; overflow: hidden; background: #fff; box-shadow: 0 5px 28px #273b5610; }
.masthead { min-height: 67px; padding: 12px 22px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 700; letter-spacing: -.025em; }
.mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #e8f0ff; color: var(--blue); }
.notice { margin: 0; padding: 28px 22px; color: var(--muted); line-height: 1.55; }
.identity { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 22px 22px 17px; }
h1 { margin: 0 0 7px; font-size: clamp(24px, 6vw, 32px); letter-spacing: -.05em; overflow-wrap: anywhere; line-height: 1.05; }
.identity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.separator { width: 3px; height: 3px; border-radius: 50%; background: #98a7bc; }
.long { color: var(--green); }
.short { color: var(--red); }
.badge { flex: none; border-radius: 999px; padding: 5px 9px; background: #edf1f8; color: #415575; font-size: 11px; font-weight: 700; }
.badge[data-state="ACTIVE"] { color: #09634e; background: #def6ee; }
.badge[data-state="PENDING"] { color: #81520f; background: #fff1d6; }
.tabs { display: flex; padding: 0 22px; gap: 21px; border-bottom: 1px solid var(--border); }
.tabs button { border: none; border-bottom: 2px solid transparent; padding: 12px 0 10px; margin-bottom: -1px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.tabs [aria-pressed="true"] { border-color: var(--blue); color: var(--blue); }
.panel { padding: 16px 22px; }
.price-row, .toolbar, .chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price-row { margin-bottom: 13px; }
.muted { color: var(--muted); font-size: 12px; }
.price { font-size: clamp(23px, 5vw, 31px); font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.feed { white-space: nowrap; font-weight: 650; font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.feed::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #9ca9bc; }
.feed[data-live="true"]::before { background: #10a37b; }
.toolbar { margin-bottom: 9px; }
.intervals { display: flex; align-items: center; gap: 2px; min-width: max-content; }
.toolbar button { min-height: 36px; font-size: 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; }
.intervals button { padding: 0 7px; color: var(--muted); }
.toolbar [aria-pressed="true"] { background: #eaf1ff; color: var(--blue); }
.toolbar .range-button { margin-left: auto; padding: 0 8px; border-color: var(--border); white-space: nowrap; color: var(--blue); }
.toolbar .icon-button { display: grid; place-items: center; flex: 0 0 32px; color: var(--muted); }
#chart { height: clamp(332px, 53vh, 536px); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.chart-error { color: #89541b; background: #fff5e5; border-radius: 7px; padding: 8px 10px; font-size: 12px; margin: 8px 0; }
.chart-foot { margin-top: 8px; font-size: 11px; color: var(--muted); }
.text-button { padding: 6px 0; border: 0; background: transparent; font-size: 11px; font-weight: 650; color: var(--muted); }
.text-button[aria-pressed="true"] { color: var(--blue); }
.details { min-height: 280px; padding-bottom: 26px; }
h2 { font-size: 16px; margin: 4px 0 14px; letter-spacing: -.02em; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th { text-align: left; background: #f1f5fa; color: var(--muted); font-size: 11px; font-weight: 650; }
td, th { padding: 9px 7px; border-bottom: 1px solid var(--border); }
td:last-child, th:last-child { text-align: right; white-space: nowrap; }
#timeline { margin: 0; padding: 0; list-style: none; }
#timeline li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
#timeline time { color: var(--muted); font-size: 11px; }
body.expanded { overflow: hidden; }
body.expanded #chart-panel { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: #fff; }
body.expanded #chart { flex: 1; min-height: 0; }

@media (max-width: 560px) {
  body { background: #fff; }
  .shell { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .masthead { min-height: 56px; padding: 10px 15px; }
  .mark { width: 31px; height: 31px; }
  .identity { padding: 17px 15px 12px; }
  .tabs { padding: 0 15px; }
  .panel { padding: 13px 13px 15px; }
}
