/* Legal pages (terms, privacy, refunds, oferta). Colors, fonts, .card, .chip and the theme toggle
   come from styles.css; this only undoes its full-screen map layout and sets the text. */

body.doc {
  height: auto;
  min-height: 100%;
  overflow: auto;
  font-size: 16px;
  line-height: 1.6;
}

.doc-bar,
.doc-nav,
.doc-main,
.doc-foot {
  width: min(760px, 100%);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.doc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: max(var(--gutter), env(safe-area-inset-top));
}

.doc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.doc-brand:hover {
  opacity: 0.8;
}

.doc-bar .theme-toggle {
  position: static;
  flex: none;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.doc-nav .chip {
  color: var(--muted);
  text-decoration: none;
}

.doc-nav .chip[aria-current='page'] {
  border-color: transparent;
  background: var(--ink);
  color: var(--ink-text);
}

.doc-main {
  margin-top: 14px;
}

.doc-card {
  padding: clamp(22px, 6vw, 48px);
  border-radius: 22px;
  background: var(--surface-solid);
}

.doc-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.doc-subtitle {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.doc-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.doc-lede {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.doc-card h2 {
  margin: 40px 0 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.doc-card h3 {
  margin: 24px 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.doc-card p,
.doc-card ul {
  margin: 0 0 12px;
}

.doc-card ul {
  padding-left: 1.25em;
}

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

.doc-card li::marker {
  color: var(--muted);
}

.doc-card a {
  color: var(--epic-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* A button-style link, like "Drop a pin" on the pricing page. */
.doc-card a.chip {
  margin-top: 4px;
  padding: 0 18px;
  min-height: 40px;
  font-size: 14px;
  text-decoration: none;
}

.doc-card a.chip--solid {
  color: var(--ink-text);
}

.doc-card strong {
  font-weight: 600;
}

/* The short version at the top of each page. */
.doc-summary {
  margin: 24px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--hover);
}

.doc-summary h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-summary ul {
  margin: 0;
}

/* --- Tables (pin tiers, what's stored) --- */

.doc-table {
  width: 100%;
  margin: 8px 0 16px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.doc-table th,
.doc-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc-table th:last-child,
.doc-table td:last-child {
  padding-right: 0;
}

.doc-table thead th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.doc-table tbody th {
  font-weight: 600;
}

.doc-table .num {
  font-variant-numeric: tabular-nums;
}

.doc-tier {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
}

.doc-tier__pin {
  justify-self: center;
  width: 18px;
  height: 24px;
}

.doc-tier__rarity {
  display: block;
  color: var(--tier-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Details the owner still has to fill in. Loud on purpose, so none slip through. */
.ph {
  padding: 0 0.25em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--legendary) 30%, transparent);
  color: var(--text);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.doc-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}

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

.doc-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.doc-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  padding-top: 20px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
}

.doc-foot p {
  margin: 0;
}

.doc-foot a {
  color: inherit;
}

@media (max-width: 640px) {
  .doc-brand {
    font-size: 16px;
  }

  .doc-brand img {
    width: 28px;
    height: 28px;
  }

  .doc-lede {
    font-size: 17px;
  }

  .doc-table {
    font-size: 14px;
  }

  .doc-details {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .doc-details dd + dt {
    margin-top: 8px;
  }
}
