/* CoinParty — reset, typography, focus (step 4). Mobile-first, 360px baseline. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: var(--f-body);
  font-size: var(--t-base);
  font-weight: var(--w-normal);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background-color: var(--c-paper);
  /* The paper grain: two very low-contrast washes, no image request. */
  background-image:
    radial-gradient(circle at 12% 8%, rgba(245, 163, 2, 0.07) 0, transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(176, 0, 79, 0.06) 0, transparent 38%);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

canvas {
  touch-action: manipulation;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* ---------------------------------------------------------------- typography */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: var(--w-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: var(--w-bold);
}

small {
  font-size: var(--t-sm);
}

a {
  color: var(--c-teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--c-teal-deep);
}

/* ---------------------------------------------------------------- focus */
/* One visible ring everywhere. Never removed — keyboard use is a requirement,
 * not a preference, and the audit at step 8 checks for it. */

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-sm);
}

/* ---------------------------------------------------------------- tables */

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
}

/* ---------------------------------------------------------------- utility */

.a11y-hide {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

@media (min-width: 48rem) {
  :root {
    --wrap-pad: var(--s-5);
  }
}

/* ---------------------------------------------------------------- motion */
/* Global opt-out. motion.css repeats the guard for its own keyframes; this block
 * covers anything that slips through, including smooth scrolling. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- print */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .topbar,
  .footbar,
  .crumbs-bar,
  .pops {
    display: none !important;
  }
}
