/*
 * TCG Priced. One idea: an answer is a paper price tag hanging on a dark
 * playmat. Felt green for the page, tag paper for answers, green stamp ink for
 * finishes. System fonts only; no scripts.
 */
:root {
  color-scheme: dark;
  --felt: #0f2a23;
  --felt-raised: #143429;
  --rail: #3a6655;
  --line: #2b5143;
  --text: #ecf3ee;
  --muted: #b1c8bd;
  --paper: #f4eddd;
  --paper-edge: #ddd2b9;
  --ink: #1b1f1c;
  --ink-muted: #545a52;
  --stamp: #1d6650;
  --focus: #f4eddd;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 34rem;
}

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

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

body {
  margin: 0;
  background: var(--felt);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--sans);
  font-kerning: normal;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 48rem) {
  .wrap {
    padding: 0 2rem;
  }
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  z-index: 2;
}

/* Header */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

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

.brand svg {
  display: block;
}

.brand .mark {
  width: 2.25rem;
  height: 2.25rem;
}

.brand .wordmark {
  height: 1.3rem;
  width: auto;
}

.site-head nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.site-head nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.5rem 0;
}

.site-head nav a:hover {
  color: var(--text);
}

@media (max-width: 30rem) {
  .site-head nav .wide {
    display: none;
  }
}

/* Hero */
.hero {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

@media (min-width: 64rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    column-gap: 4rem;
    align-items: end;
    padding-top: 3.5rem;
  }
  .hero .lede {
    margin-top: 0;
  }
}

h1 {
  font-size: clamp(2.35rem, 1.4rem + 4.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0;
  max-width: 13ch;
  text-wrap: balance;
}

.lede {
  margin: 1.4rem 0 0;
  max-width: var(--measure);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted);
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.25rem;
  border-radius: 0.4rem;
  border: 0;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
}

.button:hover {
  background: #fffaf0;
}

.button[disabled] {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--rail);
  cursor: not-allowed;
}

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

/* The rail of hanging tags */
.rail-section {
  padding-top: 3rem;
}

.rail-note {
  margin: 0.6rem 0 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 0.95rem;
}

.rail {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  border-top: 2px solid var(--rail);
}

@media (min-width: 52rem) {
  .rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    align-items: start;
  }
}

.hang {
  position: relative;
  min-width: 0;
  padding-top: var(--drop, 1.5rem);
}

/* The string from the rail to the tag's hole. */
.hang::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: calc(var(--drop, 1.5rem) + 1.1rem);
  background: var(--rail);
}

@media (min-width: 52rem) {
  .hang:nth-child(1) {
    --drop: 1.25rem;
  }
  .hang:nth-child(2) {
    --drop: 3.25rem;
  }
  .hang:nth-child(3) {
    --drop: 2rem;
  }
}

.tag {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 2.6rem 1.4rem 1.3rem;
  clip-path: polygon(16% 0, 84% 0, 100% 1.6rem, 100% 100%, 0 100%, 0 1.6rem);
  border-radius: 0 0 0.35rem 0.35rem;
}

/* The punched hole. */
.tag::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: 50%;
  width: 0.8rem;
  height: 0.8rem;
  margin-left: -0.4rem;
  border-radius: 50%;
  background: var(--felt);
  box-shadow: inset 0 0 0 2px var(--paper-edge);
}

.tag-asked {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
  border-bottom: 1px dashed var(--paper-edge);
  padding-bottom: 0.7rem;
}

.tag-asked code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.tag h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.tag-where {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.prices {
  margin: 1rem 0 0;
  padding: 0;
}

.prices div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
}

.prices div + div {
  border-top: 1px solid var(--paper-edge);
}

.prices dt {
  color: var(--stamp);
  font-weight: 700;
  font-size: 0.95rem;
}

.prices dd {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}

.tag-note {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.tag-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--stamp);
  padding: 0.2rem 0;
}

/* Sections */
.section {
  padding-top: 5rem;
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0;
  text-wrap: balance;
}

.section-lede {
  margin: 0.8rem 0 0;
  max-width: var(--measure);
  color: var(--muted);
}

.add {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.25rem;
}

@media (min-width: 52rem) {
  .add {
    grid-template-columns: 1.15fr 1.15fr 0.7fr;
    gap: 3rem;
  }
}

.add h3 {
  margin: 0;
  font-size: 1.2rem;
}

.add p,
.add ol {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.add ol {
  padding-left: 1.25rem;
}

.add li + li {
  margin-top: 0.3rem;
}

.add strong {
  color: var(--text);
  font-weight: 600;
}

.url {
  display: block;
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  background: var(--felt-raised);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--text);
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

@media (max-width: 30rem) {
  .url {
    font-size: 0.8rem;
    padding: 0.65rem 0.6rem;
  }
}

.status {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--paper);
  border-left: 3px solid var(--paper);
  padding-left: 0.6rem;
}

.games {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  border-top: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3rem;
  }
}

.games li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.games span {
  font-weight: 600;
}

.games a {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.25rem 0;
}

.rules {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 44rem;
}

.rules li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.rules strong {
  display: block;
  font-size: 1.05rem;
}

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

/* Footer */
.site-foot {
  margin-top: 6rem;
  padding-bottom: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.foot-inner {
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.site-foot p {
  margin: 0 0 0.75rem;
  max-width: 44rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
}

.foot-links a {
  color: var(--text);
  padding: 0.25rem 0;
}

/* Text pages: privacy, terms, support, 404 */
.doc {
  padding-top: 2rem;
}

.doc > * {
  max-width: 42rem;
}

.doc h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem);
  max-width: none;
}

.doc .updated {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.doc h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
}

.doc p,
.doc li {
  color: #d5e2db;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 0.4rem;
}

.doc code {
  font-family: var(--mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.doc address {
  font-style: normal;
}

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