/*
 * TipDragon's public pages: the Mini App's velvet (Renessa's grain), its
 * droplet cards and raised buttons, so the site, Tippy and Renessa look
 * like one family. Dark only, as the apps are.
 */
:root {
  --bg: #0b0910;
  --purple: #8b5cf6;
  --purple-edge: #5b3aa8;
  --gold: #f3c969;
  --text: #f4f1fa;
  --muted: rgba(244, 241, 250, 0.62);
  --section: rgba(196, 181, 253, 0.8);
  --hair: rgba(255, 255, 255, 0.07);
  --droplet:
    inset 0 1px 1px rgba(255, 255, 255, 0.18), inset 0 -10px 18px rgba(0, 0, 0, 0.28),
    0 12px 20px -10px rgba(0, 0, 0, 0.9);
  --raised: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 3px 10px rgba(139, 92, 246, 0.38);
  --raised-quiet: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 6px 14px -8px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* hidden means hidden, whatever display a class gives. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    url("/velvet.webp") 0 0 / 180px 180px repeat,
    radial-gradient(75% 75% at 50% 42%, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(
      115deg,
      rgba(124, 92, 170, 0) 15%,
      rgba(124, 92, 170, 0.1) 42%,
      rgba(124, 92, 170, 0) 72%
    );
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

a {
  color: #c4b5fd;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 8px;
}

/* The header: the NOBA mark, the name, and the pages. */
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: var(--raised-quiet);
}

.brand b {
  font-size: 18px;
  letter-spacing: 0.01em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--hair);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--raised-quiet);
}

/* Cards and sections. */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--hair);
  border-radius: 22px;
  box-shadow: var(--droplet);
  padding: 22px;
  margin-bottom: 16px;
}

.hero {
  display: grid;
  gap: 18px;
  padding: 0;
  overflow: hidden;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero .copy {
  padding: 0 22px 22px;
}

h1 {
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

h2 {
  font-size: 20px;
  margin: 0 0 8px;
}

h3 {
  font-size: 16px;
  margin: 18px 0 4px;
  color: var(--section);
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 800;
  color: var(--section);
  margin-bottom: 6px;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 16px;
}

p,
li {
  color: rgba(244, 241, 250, 0.86);
}

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

/* Raised buttons with a darker lip, as in the Mini App. */
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #9d74f7, var(--purple));
  border-bottom: 3px solid var(--purple-edge);
  box-shadow: var(--raised);
}

.btn.quiet {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hair);
  border-bottom: 3px solid rgba(0, 0, 0, 0.45);
  box-shadow: var(--raised-quiet);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

/* The features grid. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.grid .card {
  margin: 0;
}

.grid .card h2 {
  font-size: 17px;
}

.grid .card p {
  margin: 0;
  font-size: 15px;
}

.cmds {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cmds li code {
  display: inline-block;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 2px 6px;
  color: #e9e1ff;
}

/* The coins, NOBA first. */
.coins {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.coins li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 700;
}

.coins img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

/* Legal pages: readable lines. */
.legal h2 {
  margin-top: 28px;
  font-size: 18px;
}

.legal ol,
.legal ul {
  padding-left: 22px;
}

.legal li {
  margin: 4px 0;
}

/* A fact still to fill in before the page is final. */
mark.fill {
  background: rgba(243, 201, 105, 0.18);
  color: var(--gold);
  border-radius: 4px;
  padding: 0 4px;
}

footer {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

footer a {
  color: var(--muted);
}

/* Sign-in and the wallet. */
.narrow {
  max-width: 520px;
}

.stack {
  display: grid;
  gap: 16px;
}

.stack .card {
  margin: 0;
}

.h2 {
  font-size: 24px;
  margin: 2px 0 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

.grow {
  flex: 1;
  min-width: 0;
  display: grid;
}

.small {
  font-size: 13px;
}

.signin {
  display: grid;
  gap: 10px;
  margin: 8px 0 16px;
}

.provider {
  text-align: center;
}

.telegram {
  min-height: 44px;
}

.notice {
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
}

.notice.bad {
  color: #ffb3c1;
  background: rgba(255, 118, 147, 0.1);
}

button.btn {
  font: inherit;
  cursor: pointer;
}

button.btn.small {
  padding: 7px 12px;
  font-size: 13px;
}

button.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.05);
  color: var(--section);
}

.toggle {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.coinlist,
.history,
.devices {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.coinlist li,
.history li,
.devices li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--hair);
}

.coinlist li:first-child,
.history li:first-child,
.devices li:first-child {
  border-top: 0;
}

.coinlist img,
.history img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
}

.coinlist .zero {
  opacity: 0.5;
}

.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.amount.in {
  color: #7ee2a8;
}

#more {
  margin-top: 10px;
}

/* The security page. */
.field {
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
  min-width: 0;
}

.field:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.row .field {
  flex: 1;
  max-width: 220px;
}

.grid-form {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

/* Confirm on another app: a switch, then each group with its dollar amount. */
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--purple);
}

.cf-groups {
  display: grid;
  gap: 10px;
  padding-left: 30px;
}

.cf-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cf-over {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cf-over .field {
  width: 120px;
}

.qr {
  display: block;
  width: 200px;
  height: 200px;
  max-width: 100%;
  border-radius: 12px;
  background: #fff;
  margin: 8px 0;
}

.totp {
  margin-top: 8px;
}

.words {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  padding-left: 0;
  list-style-position: inside;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
}

.words li {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--hair);
  background: rgba(0, 0, 0, 0.3);
}

.phrase {
  border-color: rgba(243, 201, 105, 0.45);
}

details.recover {
  margin-top: 12px;
}

details.recover summary {
  cursor: pointer;
  color: var(--section);
  font-weight: 700;
}

/* Coins and the coin page. */
.coinlink {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.coinlink:hover b {
  color: var(--section);
}

.right {
  display: grid;
  justify-items: end;
  text-align: right;
}

.total-usd {
  font-size: 22px;
  font-weight: 800;
  margin: -4px 0 8px;
}

.coin-big {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
}

.amount.big {
  font-size: 20px;
}

.tabs {
  margin-top: 12px;
}

.address {
  overflow-wrap: anywhere;
}

.address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.field.wide {
  width: 100%;
  max-width: none;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 8px 0 12px;
}

.facts dt {
  color: var(--muted);
  font-size: 14px;
}

.facts dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.quote h3 {
  color: var(--text);
  margin-top: 0;
}
