/* shiny page styles.
   One stylesheet, embedded in the binary, no font or script from a third party.
   Every foreground and background pair below was checked against WCAG AA for
   the text size it is used at. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f6fa;
  --ink: #1a1d23;
  --muted: #55606e;
  --line: #c9d0dc;
  --link: #0b57d0;
  --link-hover: #08409b;
  --accent: #0b6b3a;
  --danger: #b3261e;
  --focus: #0b57d0;
  --chart-line: #0b57d0;
  --chart-area: rgba(11, 87, 208, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141a;
    --surface: #1b202a;
    --ink: #eceff5;
    --muted: #a8b3c4;
    --line: #3a4354;
    --link: #9dc1ff;
    --link-hover: #c7dbff;
    --accent: #7fd6a3;
    --danger: #ffb4ab;
    --focus: #9dc1ff;
    --chart-line: #9dc1ff;
    --chart-area: rgba(157, 193, 255, 0.16);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  color: var(--link);
  padding: 0.6rem 1rem;
  border: 2px solid var(--focus);
  z-index: 10;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.site-header,
main,
.site-footer,
.notice {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  padding-top: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.brand a { text-decoration: none; }
.tagline {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  display: block;
}

.nav,
.wallets ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.nav a[aria-current="page"] {
  font-weight: 700;
  border-bottom: 2px solid var(--link);
}

.account {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}
.account .who { margin: 0; }
.subject {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--surface);
}

h1 { font-size: 1.85rem; line-height: 1.2; margin: 1.5rem 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.35rem; }

.lede { font-size: 1.02rem; max-width: 54rem; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* An asset cell is artwork beside its name. The image is decorative and carries
   an empty alt, because the link next to it already names the asset and a
   screen reader announcing the name twice is worse than not announcing the
   picture. The box keeps its size whether or not the image loads, so a slow or
   blocked gateway cannot make the table reflow row by row as it fills in.

   The flex container is a div inside the cell rather than the cell itself:
   giving a td a display other than table-cell takes it out of the table layout
   algorithm, and browsers disagree about what happens to the row when it does. */
.asset { display: flex; align-items: center; gap: 0.5rem; }
.thumb {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border-radius: 4px;
	object-fit: cover;
	background: var(--surface, rgba(127, 127, 127, 0.12));
}
.asset-id { font-size: 0.85em; }

.notice,
.empty,
.error-inline,
.upgrade {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 6px;
  background: var(--surface);
  padding: 0.85rem 1rem;
}
.notice { margin: 1rem auto; border-left-color: var(--accent); }
.empty { color: var(--muted); border-left-color: var(--line); }
.error-inline { color: var(--danger); border-left-color: var(--danger); }
.upgrade { border-left-color: var(--accent); }
.upgrade h3 { margin-top: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 0;
  padding: 0;
}
.stats > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
}
.stats dt { font-size: 0.8rem; color: var(--muted); }
.stats dd { margin: 0.15rem 0 0; font-size: 1.05rem; font-weight: 600; }

.analytics {
  margin-top: 2rem;
  padding-top: 0.25rem;
  border-top: 2px solid var(--ink);
}
.analytics h2 { margin-bottom: 0.35rem; }
.analytics-stats { margin-top: 1rem; }
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.analytics-grid > section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem;
  background: var(--surface);
}
.analytics-grid h3 { margin-top: 0; }
.analytics-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.analytics-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.analytics-list li:last-child { border-bottom: 0; }
.analytics-list strong,
.analytics-list span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.analytics-list > li > span:not(:last-child) { color: var(--muted); }
.analytics-grid .chart { margin-top: 0; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field label { font-size: 0.85rem; color: var(--muted); }
input[type="text"],
select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  min-width: 12rem;
}

button,
.button {
  font: inherit;
  font-weight: 600;
  color: var(--bg);
  background: var(--link);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.button:hover { background: var(--link-hover); color: var(--bg); }

button.linkish {
  background: none;
  color: var(--link);
  border: 1px solid var(--line);
  font-weight: 400;
  padding: 0.2rem 0.6rem;
}
button.linkish:hover { color: var(--link-hover); background: var(--surface); }

.scroller { overflow-x: auto; }
table.grid {
  border-collapse: collapse;
  width: 100%;
  min-width: 44rem;
  font-size: 0.92rem;
}
table.grid caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.35rem 0;
}
table.grid th,
table.grid td {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
table.grid th { background: var(--surface); }
table.grid td.num { text-align: right; }

.conf {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.8rem;
  white-space: nowrap;
}
.conf-confirmed { border-color: var(--accent); color: var(--accent); }
.conf-likely { color: var(--muted); }
.conf-inferred { border-color: var(--danger); color: var(--danger); }

.chart { margin: 0.5rem 0 0; }
.chart-svg {
  width: 100%;
  height: auto;
  max-height: 18rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.chart figcaption { color: var(--muted); font-size: 0.85rem; padding-top: 0.35rem; }
.chart-line { stroke: var(--chart-line); stroke-width: 2; }
.chart-area { fill: var(--chart-area); stroke: none; }
.chart-dot { fill: var(--chart-line); }
.grid-line { stroke: var(--line); stroke-width: 1; }
.axis { stroke: var(--muted); stroke-width: 1; }
.tick { fill: var(--muted); font-size: 11px; }
.chart-data { margin-top: 0.75rem; }
.chart-data summary { cursor: pointer; color: var(--link); }

.wallets { margin-top: 1.5rem; }
.wallets h2 { display: inline-block; margin-right: 1rem; }
.wallets .current { font-weight: 700; }

/* A full address is 58 characters with no break opportunity, so it is allowed
   to wrap anywhere rather than push a phone-width page sideways. */
.address-full {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.wallet-lookup input[type="text"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-width: min(36rem, 80vw);
}

.steps { max-width: 54rem; }
.pager { margin-top: 0.75rem; }

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer h2 { font-size: 1rem; margin-top: 0.5rem; }

@media (max-width: 40rem) {
  .account { margin-left: 0; }
  h1 { font-size: 1.5rem; }
  .analytics-grid { grid-template-columns: 1fr; }
}
