:root {
  --bg: #fcf5ec;
  --surface: #fffaf4;
  --text: #24120a;
  --muted: #7a5641;
  --accent: #f28c3b;
  --accent-2: #ffb36b;
  --border: rgba(36, 18, 10, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: absolute;
  top: -0.8rem;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1.2rem 2rem 0;
  pointer-events: none;
}

.site-header a {
  pointer-events: auto;
}

.site-home {
  color: #fffdf9;
  text-decoration: none;
  font-size: clamp(4.2rem, 7vw, 5.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0;
  background: transparent;
  border: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* Add .site-header--info-article to the header on content/comparison pages
   (like debt-relief) to shrink the WWJD wordmark — not for mad-lib pages. */
.site-header--info-article .site-home {
  font-size: clamp(2.6rem, 4vw, 3.4rem);
}

/* the base .site-nav rule shifts left by -0.8rem (tuned for the home header's
   wider logo); on info-article pages that leaves the pill group off-center */
.site-header--info-article .site-nav {
  transform: translate(7.5px, -0.45rem);
}

.site-home:hover {
  transform: translateY(-1px);
}

.site-nav .site-home {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 0.4rem !important;
  box-shadow: none !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  margin: 0 0.05rem;
  transform-origin: center top;
  transform: translate(-0.7rem, 1.3rem) scale(0.9);
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  margin: 0 auto;
  max-width: min(1280px, calc(100% - 2rem));
  padding-top: 0.6rem;
  transform: translate(-0.8rem, -0.45rem);
}

.site-header:not(.site-header--light) .site-nav,
.site-header--home .site-nav {
  transform: translate(-0.8rem, 0.31rem);
}

.site-nav a {
  color: #fffdf9;
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.16);
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  max-width: 13.5rem;
}

/* "Random Number Gen" is noticeably longer than the other nav labels, which
   was forcing it wider than its equal flex share and throwing the left/right
   balance around the logo off. Trim just this one label to match. */
.site-nav a:first-child {
  font-size: 0.85rem;
}

/* Spanish nav labels run longer than their English counterparts, so they
   need a smaller size/tighter padding to keep the header on one line. */
html[lang="es"] .site-nav a:not(.site-home) {
  font-size: 0.82rem;
  padding: 0.4rem 0.55rem;
  letter-spacing: -0.01em;
}

.site-header--light .site-nav a {
  color: var(--accent);
  background: rgba(242, 140, 59, 0.12);
}

.site-header--light .site-home {
  color: var(--accent);
  flex-direction: column;
  gap: 0.15rem;
}

.site-header--light .site-nav .site-home {
  transform: translate(-0.7rem, 1.3rem) scale(0.8);
}

.site-header--info-article .site-nav .site-home {
  transform: translate(0, 1.3rem) scale(0.8);
}

.site-header--home .site-nav .site-home {
  transform: translate(-0.7rem, 1.3rem) scale(0.9);
}

.site-home-subtext {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--accent);
  opacity: 0.85;
  margin-top: 0.22rem;
}

.handwritten {
  font-family: "Caveat", cursive;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h2.handwritten {
  font-size: 2.6rem;
}

.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 3rem;
  background-color: var(--bg);
  color: #fffdf9;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: clamp(0.6rem, 1.8vw, 0.22in);
  right: clamp(1rem, 3vw, 0.4in);
  bottom: clamp(1rem, 3.2vw, 0.32in);
  left: clamp(1rem, 3vw, 0.4in);
  border: 7px solid var(--accent);
  border-radius: clamp(0.9rem, 3vw, 1.4rem);
  background:
    linear-gradient(90deg, rgba(20, 12, 7, 0.78) 0%, rgba(20, 12, 7, 0.34) 48%, rgba(20, 12, 7, 0.7) 100%),
    url("Juan.png") top/cover no-repeat;
  background-color: #f4e0c8;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: clamp(0.6rem, 1.8vw, 0.22in);
  right: clamp(1rem, 3vw, 0.4in);
  bottom: clamp(1rem, 3.2vw, 0.32in);
  left: clamp(1rem, 3vw, 0.4in);
  border-radius: clamp(0.9rem, 3vw, 1.4rem);
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.08), rgba(20, 12, 7, 0.08));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  text-align: center;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 2rem;
  min-height: 660px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 1rem;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin-top: 0;
}

h1 {
  font-size: clamp(4.4rem, 8.2vw, 7rem);
  margin-top: 4.5rem;
  margin-bottom: 2.2rem;
  letter-spacing: 0.02em;
}

.lead {
  color: rgba(255, 253, 249, 0.92);
  font-size: 1.55rem;
  max-width: none;
  margin: 0.25rem auto 2rem;
  line-height: 1.75;
  white-space: nowrap;
}

html[lang="es"] .lead {
  white-space: normal;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  transition: transform 180ms ease;
  max-width: none;
  width: fit-content;
  white-space: nowrap;
  cursor: pointer;
}

.hero-content .btn {
  min-width: 312px;
  text-align: center;
  margin: 5.5rem auto 0;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rng-inputs input:disabled {
  opacity: 0.6;
}

.btn-primary {
  background: var(--accent);
  color: #2f1303;
}

.social-strip {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  text-align: center;
}

.social-strip a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.intro-section,
.posts-section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.2rem 0 3.6rem;
}

.intro-section {
  border-bottom: 1px solid var(--border);
}

.page-hero {
  padding-top: 10rem;
}

.wheel-section {
  padding-top: 8.5rem;
  padding-bottom: 2rem;
}

@media (min-width: 701px) {
  .wheel-section {
    width: min(940px, calc(100% - 4rem));
    margin: 0 auto 0 3rem;
  }

  .spinner-section {
    width: min(700px, calc(100% - 4rem));
    margin: 0 auto 0 3rem;
  }

  .spinner-section .wheel-back-home {
    margin-left: calc((100% - 480px) / 2);
  }
}

.tool-box,
.wheel-app {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 1.5rem;
}

.tool-box {
  margin: 2rem 0;
  max-width: 420px;
}

.wheel-app {
  margin: 1rem auto 0;
  max-width: 940px;
  display: grid;
  grid-template-columns: minmax(280px, 640px) 1fr;
  gap: 2rem;
  align-items: stretch;
  text-align: left;
}

.wheel-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.wheel-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 620px;
}

#wheel-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(36, 18, 10, 0.35);
}

.wheel-pointer {
  position: absolute;
  top: -42px;
  left: 50%;
  width: 22px;
  height: 54px;
  margin-left: -11px;
  transform-origin: 50% 0%;
  clip-path: polygon(20% 0%, 80% 0%, 52% 100%, 48% 100%);
  background: var(--accent);
  filter: drop-shadow(0 4px 6px rgba(36, 18, 10, 0.35));
  z-index: 2;
}

.wheel-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: 100%;
}

.wheel-sidebar label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}

#wheel-panel-entries {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.7rem;
}

#wheel-panel-results {
  flex: 1;
  min-height: 0;
}

#wheel-entries {
  width: 100%;
  flex: 1;
  min-height: 0;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  resize: none;
  line-height: 1.6;
}

.wheel-controls {
  display: flex;
  gap: 0.6rem;
}

.wheel-mini-btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.wheel-mini-btn:hover {
  background: var(--accent);
  color: #2f1303;
}

.wheel-mini-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wheel-count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.wheel-winner-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(36, 18, 10, 0.55);
}

.wheel-winner-overlay:not([hidden]) {
  display: flex;
}

.wheel-winner-modal {
  width: min(92vw, 760px);
  max-height: min(85vh, 700px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 60px rgba(36, 18, 10, 0.4);
  animation: wheel-winner-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes wheel-winner-pop {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.wheel-winner-banner {
  margin: 0;
  padding: 1.4rem 1rem;
  background: var(--accent);
  color: #2f1303;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 1.4rem;
  font-weight: 700;
}

.wheel-winner-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.wheel-winner-name {
  margin: 0;
  font-size: 4.5rem;
  line-height: 1.1;
  color: var(--text);
  word-break: break-word;
}

.wheel-winner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.wheel-back-home {
  display: block;
  width: fit-content;
  margin: 1.75rem 0 0;
  font-size: 1rem;
  padding: 0.75rem 1.4rem;
}

.rng-inputs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.rng-inputs label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.rng-inputs input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.rng-result {
  margin-top: 1.2rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  transform-origin: center;
}

.rng-result--pulse {
  animation: rng-pulse 2.4s;
}

@keyframes rng-pulse {
  0% {
    transform: scale(1);
    animation-timing-function: ease-out;
  }
  20% {
    transform: scale(1.7);
    animation-timing-function: ease-in-out;
  }
  100% {
    transform: scale(1);
  }
}

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
}

.confetti-piece {
  position: fixed;
  width: 5px;
  height: 9px;
  opacity: 1;
  animation: confetti-burst 1.7s ease-out forwards;
}

@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    opacity: 0;
  }
}

.intro-content {
  max-width: 760px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.35rem;
  box-shadow: 0 8px 24px rgba(36, 18, 10, 0.04);
}

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

a.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

a.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(36, 18, 10, 0.1);
}

.madlib-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  max-width: 760px;
  margin: 1.6rem 0 2.2rem;
}

.madlib-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 1.4rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(36, 18, 10, 0.04);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

a.madlib-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(36, 18, 10, 0.1);
}

.madlib-card-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.madlib-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
}

.madlib-card-cta {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.madlib-card--soon {
  border-color: var(--border);
  opacity: 0.6;
}

.madlib-card--soon .madlib-card-kicker,
.madlib-card--soon .madlib-card-cta {
  color: var(--muted);
}

@media (max-width: 700px) {
  .madlib-grid {
    grid-template-columns: 1fr;
  }
}

.madlib-form-box.spinner-tool {
  max-width: 480px;
  text-align: left;
}

.madlib-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.madlib-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.madlib-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}

.madlib-select-optional {
  color: var(--muted);
}

.madlib-field select.madlib-select--placeholder {
  color: var(--muted);
}

.madlib-field input[type="text"],
.madlib-field select {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.madlib-field input[type="text"]::placeholder {
  color: var(--muted);
  opacity: 1;
}

.madlib-field input[type="file"] {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 400;
}

.madlib-cropper:not([hidden]) {
  margin: 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.madlib-cropper-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
  text-align: center;
}

.madlib-crop-stage {
  position: relative;
  width: 200px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  cursor: grab;
  touch-action: none;
  user-select: none;
  background: var(--bg);
}

.madlib-crop-stage:active {
  cursor: grabbing;
}

.madlib-crop-stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.madlib-zoom-slider {
  width: 200px;
}

.madlib-slider-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 200px;
}

.madlib-slider-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.madlib-photo-preview:not([hidden]) {
  margin: 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.madlib-preview-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.madlib-photo-preview img {
  width: 160px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

#dq-generate-btn {
  width: 100%;
}

.madlib-result {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--border);
}

.madlib-result-label {
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.madlib-link-row {
  display: flex;
  gap: 0.6rem;
}

.madlib-link-row input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}

.madlib-copy-note {
  min-height: 1.2rem;
  font-size: 0.82rem;
  color: var(--accent);
  margin: 0.5rem 0 0;
}

.madlib-preview-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.madlib-preview-link:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .madlib-field-row {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.spinner-mode-toggle {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 0 1.75rem;
}

.spinner-mode-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.spinner-mode-btn:hover {
  background: rgba(242, 140, 59, 0.14);
}

.spinner-mode-btn--active {
  background: var(--accent);
  color: #2f1303;
}

.spinner-mode-btn--active:hover {
  background: var(--accent);
}

.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
  text-align: left;
}

.results-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.results-item-value {
  font-weight: 700;
  color: var(--text);
}

.results-item-time {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.results-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem 0;
  text-align: center;
}

.results-footer {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.spinner-tool {
  text-align: center;
  max-width: 480px;
  margin: 2rem auto;
}

.arrow-bottle-box {
  margin-top: 0.75rem;
}

.spinner-section .intro-content {
  max-width: 480px;
  margin: 0 auto;
}

.spinner-section .intro-content > p {
  margin: 0.25rem 0;
}

.spinner-section .intro-content > p.coin-toss-subtext {
  margin: -0.45rem 0 1.1rem;
}

.spinner-dial-wrap {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--bg);
  border: 6px solid var(--accent);
  box-shadow: 0 16px 32px rgba(36, 18, 10, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-needle {
  width: 78%;
  height: 78%;
  object-fit: contain;
  pointer-events: none;
}

.spinner-hint {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.coin-toss-box {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
}

.coin-toss-box > div {
  width: 100%;
}

.coin-toss-box:has(#coin-panel-results:not([hidden])) {
  aspect-ratio: auto;
}

.coin-wrap {
  width: min(100%, 200px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  perspective: 1000px;
  cursor: pointer;
}

@keyframes coin-press {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(2.1);
  }
  100% {
    transform: scale(1);
  }
}

.coin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid #7a3f10;
  box-shadow: 0 16px 32px rgba(36, 18, 10, 0.3);
  backface-visibility: hidden;
  overflow: hidden;
}

.coin-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.coin-portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.coin-portrait--heads {
  width: 74%;
  height: 82%;
  top: 48.5%;
}

.coin-portrait--tails {
  width: 95%;
  height: 44.6%;
}

.coin-face--heads,
.coin-face--tails {
  background: radial-gradient(circle at 35% 30%, #e8c766 0%, #d4af37 55%, #b8911f 100%);
}

.coin-face--tails {
  transform: rotateX(180deg);
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 701px) and (max-width: 1279px) {
  .site-nav {
    justify-content: center;
    row-gap: 0.9rem;
  }

  .site-nav .site-home {
    order: 10;
    flex: 0 0 100% !important;
  }

  .site-header--light .site-nav .site-home {
    margin: 0.4rem auto 0;
    transform: none;
  }

  .page-hero {
    padding-top: 14rem;
  }
}

@media (max-width: 700px) {
  .site-header {
    padding: 2.25rem 1rem 0;
  }

  .site-nav,
  .site-header--home .site-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 0.1rem;
    column-gap: 0.35rem;
    transform: none;
  }

  .site-nav a {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    line-height: 1.25;
    white-space: normal;
    max-width: none;
  }

  .site-nav .site-home {
    grid-column: 1 / -1;
    justify-self: center;
    order: 10;
    font-size: 2.6rem;
    margin: 0.35rem 0 0;
    transform: none;
  }

  .site-header--light .site-nav .site-home {
    font-size: 2.6rem;
    margin-top: 0.1rem;
    transform: none;
  }

  .site-home-subtext {
    margin-top: -0.5rem;
  }

  .site-header--home .site-nav .site-home {
    transform: none;
  }

  .site-header--light .site-home-subtext {
    font-size: 1.05rem;
  }

  .hero-section {
    min-height: 100svh;
    padding: 7rem 1rem 2rem;
  }

  .hero-section::before,
  .hero-overlay {
    inset: 0.5rem;
    border-radius: 1rem;
  }

  .hero-content {
    min-width: 0;
    margin-top: 0;
    padding-top: 12.6rem;
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(2.3rem, 11.5vw, 3.7rem);
    margin-top: 1.5rem;
  }

  .lead {
    white-space: normal;
    font-size: 1.15rem;
    margin: 1rem auto 0;
  }

  .btn {
    min-width: 0;
    white-space: normal;
  }

  .hero-content .btn {
    margin-top: 5rem;
  }

  .page-hero {
    padding-top: 11.25rem;
  }

  .page-hero .intro-content > p {
    margin: 0.4rem 0;
  }

  .tool-box {
    max-width: 100%;
    margin-top: 0.75rem;
  }

  .rng-inputs {
    margin-bottom: 0.5rem;
  }

  .page-hero h2.handwritten {
    font-size: 2rem;
  }

  .wheel-app {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .wheel-canvas-wrap {
    max-width: 560px;
  }

  .wheel-sidebar {
    width: 100%;
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  .site-header {
    padding-top: 1.1rem;
  }

  .page-hero {
    padding-top: 12.5rem;
  }
}

:root {
  --gold: #b8860b;
}

.dr-adbar {
  margin: 0 0 1.3rem;
  padding: 0;
  background: none;
  font-size: 0.68rem;
  line-height: 1.5;
}

.dr-adbar--footer {
  margin: 1.6rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.dr-adbar-line {
  margin: 0;
  color: #000;
}

.dr-adbar-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #000;
  text-decoration: underline;
  cursor: pointer;
}

.dr-adbar-body {
  margin: 0.5rem 0 0;
  color: #000;
}

.dr-hero {
  position: relative;
  border-bottom: none;
  width: 100%;
  margin: 0;
  margin-top: 6.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 17vw, 520px);
  padding-top: 0;
  padding-bottom: 1.25rem;
}

.dr-hero::before {
  content: "";
  position: absolute;
  top: 0;
  height: clamp(420px, 17vw, 520px);
  left: 0;
  right: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(252, 245, 236, 0.15), rgba(252, 245, 236, 0.15)),
    url("/debt-relief/credit-card-cutting-long.jpg");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.dr-hero .intro-content {
  position: relative;
  z-index: 1;
  max-width: clamp(460px, 40vw, 760px);
  margin-left: max(1rem, calc((100% - 1120px) / 2 - 40px));
  margin-right: 1rem;
}

.dr-title {
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 4.2vw, 2.3rem);
  line-height: 1.1;
  margin: 1.3rem 0 0.9rem;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}

.dr-hero .eyebrow {
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 1.3rem;
}

.dr-subtitle {
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0 0 1.7rem;
}

.dr-hero-desc {
  color: #fff;
  font-weight: 700;
  margin-bottom: 2.2rem;
}

.dr-section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2.4rem;
}

/* Forbes Advisor-style ranked list */
.dr-content-row {
  width: calc(100% - 2 * max(1rem, calc((100% - 1120px) / 2 - 40px)));
  margin-left: max(1rem, calc((100% - 1120px) / 2 - 40px));
  margin-right: 0;
  display: flex;
  align-items: flex-start;
  gap: 4rem;
}

.dr-sidebar {
  flex: 1;
  min-width: 220px;
  position: sticky;
  top: 2rem;
}

.dr-sidebar-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 1rem;
}

/* YouTube-clickbait style related-article cards */
.yt-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin: 0 0 1.75rem;
}

.yt-ring {
  border-radius: 20px;
  padding: 4px;
  background: linear-gradient(
    135deg,
    #ff1f3d,
    #ff9a1f,
    #ffe01f,
    #34d47a,
    #1fc0ff,
    #9a4dff,
    #ff1f8c,
    #ff1f3d
  );
  background-size: 260% 260%;
  background-position: 0% 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .yt-card:hover .yt-ring,
  .yt-card:focus-visible .yt-ring {
    animation: yt-rainbow-flow 3.5s linear infinite;
  }
}

@keyframes yt-rainbow-flow {
  to {
    background-position: 260% 50%;
  }
}

.yt-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  container-type: size;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a1a;
  display: block;
}

.yt-thumb--finally {
  aspect-ratio: 1448 / 1051;
  border-radius: 18px;
}

.yt-thumb--mce-finally {
  aspect-ratio: 1448 / 1073;
  border-radius: 18px;
}

.yt-finally-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2.9cqw solid transparent;
  background: repeating-linear-gradient(
      to right,
      #ff1f3d 0%,
      #ff9a1f 14.28%,
      #ffe01f 28.57%,
      #34d47a 42.85%,
      #1fc0ff 57.14%,
      #9a4dff 71.42%,
      #ff1f8c 85.71%,
      #ff1f3d 100%
    )
    border-box;
  background-size: 400% 100%;
  background-position: 0% 50%;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .yt-finally-ring {
    animation: yt-rainbow-flow-seamless 21.6s linear infinite;
  }
}

@keyframes yt-rainbow-flow-seamless {
  to {
    background-position: 400% 50%;
  }
}

.yt-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.yt-card:hover .yt-thumb-img {
  transform: scale(1.04);
}

.yt-card:hover .yt-thumb--finally .yt-thumb-img,
.yt-card:hover .yt-thumb--mce-finally .yt-thumb-img {
  transform: none;
}

.yt-juan {
  position: absolute;
  left: -4%;
  bottom: -4%;
  width: 40%;
  height: auto;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.yt-mystery {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #c7c9cc;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.yt-mystery--dq {
  left: 65%;
  top: 45%;
  width: 21%;
  height: 41%;
  transform: translate(-50%, -50%) rotate(8deg);
}

.yt-mystery--mce {
  left: 55%;
  top: 30%;
  width: 15%;
  height: 32%;
}

.yt-mystery-q {
  font-family: "Luckiest Guy", "Inter", sans-serif;
  color: #4a4d52;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.25);
}

.yt-mystery--dq .yt-mystery-q {
  font-size: 3rem;
  display: inline-block;
  transform: rotate(-8deg);
}

.yt-mystery--mce .yt-mystery-q {
  font-size: 1.6rem;
}

.yt-redcircle {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3.5px solid #ff0000;
  z-index: 2;
  pointer-events: none;
}

.yt-redcircle--dq {
  left: 65%;
  top: 45%;
  width: 74cqmin;
  height: 74cqmin;
}

.yt-redcircle--mce {
  left: 55%;
  top: 30%;
  width: 56cqmin;
  height: 56cqmin;
}

.yt-arrow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.yt-callout-text {
  position: absolute;
  z-index: 5;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff200;
  paint-order: stroke fill;
  -webkit-text-stroke: 4px #000;
  text-stroke: 4px #000;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  pointer-events: none;
}

.yt-callout-text--dq {
  left: 4%;
  top: 14%;
  transform: rotate(-8deg);
  transform-origin: left center;
}

.yt-callout-text--mce {
  left: 3%;
  top: 11%;
  transform: rotate(-8deg);
  transform-origin: left center;
}

.yt-desc {
  margin: 0.65rem 0.1rem 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

html[lang="es"] .yt-callout-text {
  font-size: 0.66rem;
}

@media (max-width: 900px) {
  .dr-content-row {
    flex-direction: column;
  }

  .dr-sidebar {
    position: static;
    width: 100%;
  }

  .dr-hero {
    margin-top: 10.5rem;
    min-height: 360px;
  }

  .dr-hero::before {
    top: 0;
    height: 360px;
    background-position: left center;
    background-image:
      linear-gradient(rgba(252, 245, 236, 0.15), rgba(252, 245, 236, 0.15)),
      url("/debt-relief/credit-card-cutting-long.jpg");
  }

  .dr-hero .intro-content {
    max-width: calc(100% - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .dr-title {
    white-space: normal;
  }
}

.fb-list {
  max-width: 820px;
  flex: 0 1 820px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fb-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e2e5e9;
  border-radius: 12px;
  padding: 1.3rem;
}

.fb-card--winner {
  background: linear-gradient(180deg, #fdf9ee, #faf1da);
  border: 1.5px solid #d9b455;
  box-shadow: 0 6px 18px rgba(190, 150, 40, 0.16);
}

.fb-card-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  flex: none;
  width: 6.5rem;
}

.fb-logo-img {
  display: block;
  width: 100%;
  height: auto;
  align-self: center;
}

.fb-rank-num {
  font-size: 1.7rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
}

.fb-card-mid {
  flex: 1;
  min-width: 0;
}

.fb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  margin-bottom: 0.6rem;
}

.fb-kicker--gold {
  background: #f2dfa0;
  color: #7a5c12;
}

.fb-card-mid h2 {
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  color: #1a1a1a;
}

.fb-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.fb-checks li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: #0a5ca8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fb-check {
  color: #1a7d4a;
  text-decoration: none;
  font-weight: 700;
  flex: none;
  margin-top: 0.1rem;
}

.fb-card-right {
  flex: none;
  width: 9.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
}

.fb-rating-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
}

.fb-rating-num small {
  font-size: 0.9rem;
  font-weight: 700;
  color: #8a8f98;
}

.fb-rating-word {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 0.3rem;
}


.fb-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: #0a6e5c;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 150ms ease;
}

.fb-cta:hover {
  background: #054c3f;
}

.fb-cta-caption {
  font-size: 0.65rem;
  color: #8a8f98;
}

.fb-stars {
  position: relative;
  display: inline-block;
  font-size: 0.9rem;
  line-height: 1;
  letter-spacing: 1px;
}

.fb-stars-track {
  color: #d8dbe0;
}

.fb-stars-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: var(--pct);
  white-space: nowrap;
  color: #0a6e5c;
}

@media (max-width: 560px) {
  .fb-card {
    flex-direction: column;
    align-items: stretch;
  }

  .fb-card-left {
    flex-direction: row;
    width: auto;
    align-items: center;
  }

  .fb-logo-img {
    width: 4rem;
  }

  .fb-card-right {
    width: auto;
  }
}

.dr-newsletter.tool-box {
  max-width: 820px;
  margin: 0 0 1.2rem;
}

.dr-newsletter-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.3rem;
}

.dr-newsletter-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.1rem;
}

.dr-freq-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dr-freq-group input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.dr-freq-group label {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.dr-freq-group input:checked + label {
  background: var(--accent);
  color: #2f1303;
}

.dr-email-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dr-email-row input[type="email"] {
  flex: 1 1 200px;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.dr-email-row .btn {
  white-space: nowrap;
}

.dr-confirm {
  display: none;
  margin: 0.9rem 0 0;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.88rem;
}

.dr-newsletter--sent form {
  display: none;
}

.dr-newsletter--sent .dr-confirm {
  display: block;
}

.dr-footnote {
  max-width: 820px;
  margin-top: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.lang-switch {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(36, 18, 10, 0.1);
  transition: background 150ms ease, color 150ms ease;
}

.lang-switch:hover {
  background: var(--accent);
  color: #fff;
}
