:root {
  --bg: #0c0c0d;
  --panel: #151517;
  --line: #29292d;
  --text: #f3f0e7;
  --muted: #a7a295;
  --gold: #dcb94a;
  --gold-hi: #f7e57a;
  --gold-lo: #b88a2e;
  --green: #74d39b;
  --red: #e5786a;
  --gutter: 20px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

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

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
}

.top nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.top nav {
  align-items: center;
  gap: 10px;
}

/* Header buttons: a gold outline, or solid gold for the main one. */
.top .btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(220, 185, 74, 0.6);
  border-radius: 999px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 650;
  white-space: nowrap;
}

.top .btn.solid {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--bg);
}

@media (hover: hover) {
  .top .btn:hover {
    border-color: var(--gold-hi);
    background: rgba(220, 185, 74, 0.12);
  }

  .top .btn.solid:hover {
    background: var(--gold-hi);
  }
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 56px var(--gutter) 72px;
  text-align: center;
  background: radial-gradient(900px 480px at 50% 0%, rgba(220, 185, 74, 0.14), transparent 70%);
}

.coin {
  width: 136px;
  height: 136px;
  filter: drop-shadow(0 14px 40px rgba(220, 185, 74, 0.3));
}

.ticker {
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 15ch;
  font-size: clamp(38px, 9vw, 76px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.45;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
}

.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- sections ---------- */

section:not(.hero) {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px var(--gutter);
  border-top: 1px solid var(--line);
}

.head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

h2 {
  font-size: clamp(28px, 5.4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.head p {
  max-width: 62ch;
  color: var(--muted);
}

#built .head {
  margin-bottom: 0;
}

/* Label and value rows, divided by hairlines */
.rows {
  border-top: 1px solid var(--line);
}

.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}

.row dt {
  color: var(--muted);
}

.row dd {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.coins .row {
  align-items: center;
}

.coins dt {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coins img {
  flex: none;
  width: 26px;
  height: 26px;
}

/* The Dahba logo file has a little empty space around the coin. Grow it to match the others. */
.coins .ours img {
  transform: scale(1.066);
}

.row.ours dt,
.row.ours dd {
  color: var(--gold-hi);
  font-weight: 800;
}

.note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}

/* Two plain columns under a hairline. No boxes: nothing here is a button. */
.pair {
  display: grid;
  gap: 30px;
}

.pair article {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pair article.gold {
  border-top-color: var(--gold);
}

.pair article.gold h3 {
  color: var(--gold-hi);
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 750;
}

.pair p {
  color: var(--muted);
}

.pair ul {
  padding-left: 20px;
  color: var(--muted);
}

.pair li + li {
  margin-top: 6px;
}

.pair li::marker {
  color: var(--gold);
}

/* ---------- block animation ---------- */

#how {
  max-width: 1040px;
}

.stage {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(520px 300px at 88% 50%, rgba(220, 185, 74, 0.16), transparent 72%),
    var(--panel);
}

#dag {
  display: block;
  width: 100%;
  height: 300px;
  touch-action: pan-y;
}

#dag.is-hot {
  cursor: pointer;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.controls button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.controls button:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.seg button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--muted);
}

@media (hover: hover) {
  .seg button:hover {
    color: var(--text);
  }

  .send button:hover {
    border-color: var(--gold-hi);
    background: rgba(220, 185, 74, 0.12);
  }
}

.seg button[aria-pressed="true"],
.seg button[aria-pressed="true"]:hover {
  background: var(--gold);
  color: var(--bg);
}

.send {
  display: flex;
  gap: 10px;
}

.send button {
  border-color: rgba(220, 185, 74, 0.55);
}

.send button:active {
  background: rgba(220, 185, 74, 0.22);
}

.pip {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text);
}

.pip.private {
  border: 2px solid var(--gold-hi);
  background: var(--bg);
}

/* Payments as an explorer lists them. Always five rows, so nothing below moves. */
.txs-title {
  margin: 34px 0 12px;
}

.txs {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.tx-head {
  display: none;
}

.tx-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "type hash amount"
    "route route block";
  align-content: center;
  align-items: center;
  gap: 7px 10px;
  height: 72px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.tx-row:last-child {
  border-bottom: 0;
}

.tx-type {
  grid-area: type;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: start;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 650 12.5px -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.tx-type .pip {
  width: 9px;
  height: 9px;
}

.tx-hash {
  grid-area: hash;
  color: var(--gold);
}

.tx-amount {
  grid-area: amount;
  font-weight: 700;
  text-align: right;
}

.tx-route {
  grid-area: route;
  display: flex;
  gap: 8px;
}

.tx-block {
  grid-area: block;
  color: var(--muted);
  text-align: right;
}

.tx-block::before {
  content: "Block ";
}

.tx-arrow,
.tx-row .pre {
  color: var(--muted);
}

.tx-row .pre {
  display: none;
}

.tx-row.private .tx-type {
  border-color: rgba(220, 185, 74, 0.55);
}

.tx-row.private .tx-type,
.tx-row.private .tx-from,
.tx-row.private .tx-to,
.tx-row.private .tx-amount {
  color: var(--gold-hi);
}

.tx-row.new {
  animation: tx-flash 0.9s ease-out;
}

@keyframes tx-flash {
  from {
    background: rgba(220, 185, 74, 0.22);
  }
  to {
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tx-row.new {
    animation: none;
  }
}

/* One line per payment, with column headings, once there is room. */
@media (min-width: 900px) {
  .tx-head,
  .tx-row {
    display: grid;
    grid-template-columns: 1.1fr 104px 70px 1.35fr 22px 1.35fr 1fr;
    grid-template-areas: none;
    gap: 0 14px;
    padding: 0 20px;
  }

  .tx-head {
    align-items: center;
    height: 42px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .tx-head span:last-child {
    text-align: right;
  }

  .tx-row {
    height: 52px;
    font-size: 14px;
  }

  .tx-row > *,
  .tx-route > * {
    grid-area: auto;
  }

  .tx-route {
    display: contents;
  }

  .tx-block {
    text-align: left;
  }

  .tx-block::before {
    content: none;
  }

  .tx-arrow {
    text-align: center;
  }

  .tx-row .pre {
    display: inline;
  }
}

/* ---------- comparison table ---------- */

/* One coin per row, one question per column. Green is good, a red X is missing, grey is slow. */

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cmp {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.cmp thead th {
  padding: 0 1px 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  vertical-align: bottom;
}

.cmp thead tr:first-child th:first-child {
  width: 29%;
}


.cmp tbody th,
.cmp tbody td {
  height: 58px;
  padding: 0 4px;
  border-top: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.cmp tbody th {
  padding-left: 10px;
  text-align: left;
}

.cmp-coin {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 650;
}

.cmp-coin img {
  flex: none;
  width: 24px;
  height: 24px;
}

.cmp td {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cmp .fast {
  color: var(--green);
  font-weight: 800;
}

.cmp .slow {
  color: var(--muted);
  font-weight: 600;
}

.cmp svg {
  display: block;
  margin: 0 auto;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cmp .yes {
  width: 22px;
  height: 22px;
  stroke: var(--green);
  stroke-width: 3;
}

.cmp .no {
  width: 18px;
  height: 18px;
  stroke: var(--red);
  stroke-width: 2.6;
}

@media (max-width: 359px) {
  .cmp thead th {
    padding-right: 0;
    padding-left: 0;
    font-size: 8.5px;
  }

  .cmp thead tr:first-child th:first-child {
    width: 35%;
  }

  .cmp .cmp-coin img {
    width: 20px;
    height: 20px;
  }

  .cmp tbody td {
    padding: 0 1px;
  }

  .cmp tbody td {
    font-size: 11.5px;
  }

  .cmp .cmp-coin {
    gap: 6px;
    font-size: 13px;
  }

  .cmp tbody th {
    padding-left: 8px;
  }
}

/* The Dahba row: a thin gold outline on a slightly lighter ground. */
.cmp .ours > * {
  border-top: 1px solid rgba(220, 185, 74, 0.45);
  border-bottom: 1px solid rgba(220, 185, 74, 0.45);
  background: var(--panel);
}

.cmp .ours > :first-child {
  border-left: 1px solid rgba(220, 185, 74, 0.45);
  border-radius: 12px 0 0 12px;
  color: var(--gold-hi);
}

.cmp .ours > :last-child {
  border-right: 1px solid rgba(220, 185, 74, 0.45);
  border-radius: 0 12px 12px 0;
}

.cmp .ours + tr > * {
  border-top-color: transparent;
}

@media (min-width: 720px) {
  .cmp thead th {
    padding-bottom: 14px;
    font-size: 14px;
    letter-spacing: 0;
  }

  .cmp thead tr:first-child th:first-child {
    width: 30%;
  }

  .cmp tbody th,
  .cmp tbody td {
    height: 68px;
  }

  .cmp tbody th {
    padding-left: 18px;
  }

  .cmp-coin {
    gap: 12px;
    font-size: 18px;
  }

  .cmp-coin img {
    width: 30px;
    height: 30px;
  }

  .cmp td {
    font-size: 17px;
  }

  .cmp .yes {
    width: 26px;
    height: 26px;
  }

  .cmp .no {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 900px) {
  .cmp thead br {
    display: none;
  }

  .cmp thead tr:first-child th:first-child {
    width: 24%;
  }
}

/* ---------- footer ---------- */

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px var(--gutter) 64px;
  border-top: 1px solid var(--line);
  text-align: center;
}

footer p {
  max-width: 52ch;
  font-weight: 600;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

@media (hover: hover) {
  .foot-links a:hover {
    color: var(--gold-hi);
  }
}

/* ---------- plain text pages (terms, privacy) ---------- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px var(--gutter) 80px;
}

.doc h1 {
  max-width: none;
  margin: 10px 0 8px;
  font-size: clamp(30px, 6vw, 46px);
}

.doc h2 {
  margin: 34px 0 8px;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.doc p {
  color: var(--muted);
}

.doc p + p {
  margin-top: 12px;
}

.doc .ticker {
  color: var(--gold);
}

.doc-date {
  margin-bottom: 26px;
  font-size: 15px;
}

.doc a {
  color: var(--gold);
  font-weight: 600;
}

footer .fine {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  .hero {
    padding: 72px var(--gutter) 96px;
  }

  .coin {
    width: 168px;
    height: 168px;
  }

  section:not(.hero) {
    padding: 88px var(--gutter);
  }

  .pair {
    grid-template-columns: 1fr 1fr;
    gap: 44px;
  }

  #dag {
    height: 400px;
  }
}

@media (max-width: 460px) {
  .top .btn {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13.5px;
  }

  .brand {
    font-size: 17px;
  }
}

.back {
  color: var(--gold);
  font-weight: 700;
}
