:root {
  --paper: #f7f1e2;
  --paper-strong: #efe4cb;
  --ink: #1e1b18;
  --muted: #6d6358;
  --frame: #c4af8a;
  --warm: #f3a712;
  --warm-hover: #df9105;
  --shadow: 0 20px 40px rgba(37, 26, 8, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 210, 133, 0.22), transparent 30%),
    radial-gradient(circle at 88% 80%, rgba(255, 154, 58, 0.2), transparent 34%),
    linear-gradient(145deg, #2f271c 0%, #5b3d1e 48%, #8b5b2b 100%);
}

.page-wrap {
  width: min(1100px, 94vw);
  margin-inline: auto;
}

.fact-card {
  border-radius: 20px;
  overflow: hidden;
  border: 0;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(251, 231, 189, 0.10);
  background: linear-gradient(180deg, #fef8ea 0%, #f4e8d0 100%);
}

.image-pane {
  padding: 0;
  display: flex;
}

.chuck-media-wrap {
  position: relative;
  width: 100%;
  min-height: 320px;
  background: linear-gradient(180deg, #d3bd96 0%, #ad8b56 100%);
}

.chuck-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: none;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
}

.content-pane {
  padding: clamp(1.2rem, 2.2vw, 2rem);
  background:
    linear-gradient(rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.24)),
    repeating-linear-gradient(
      -45deg,
      rgba(93, 62, 29, 0.04),
      rgba(93, 62, 29, 0.04) 10px,
      rgba(255, 255, 255, 0.08) 10px,
      rgba(255, 255, 255, 0.08) 20px
    );
}

.section-tag {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.fact-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.close-btn {
  border-width: 2px;
  font-weight: 600;
}

.fact-box {
  border: 2px solid var(--frame);
  border-radius: 14px;
  background: linear-gradient(170deg, var(--paper) 0%, var(--paper-strong) 100%);
  padding: clamp(1rem, 2vw, 1.6rem);
  min-height: 170px;
  display: flex;
  align-items: center;
}

.fact-text {
  font-size: clamp(1rem, 1.9vw, 1.28rem);
  line-height: 1.6;
  color: #29231d;
}

.close-notice {
  font-size: 0.9rem;
  color: #7b1f27;
  font-weight: 600;
}

.action-btn {
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 155px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.actions-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

#newFactBtn {
  background-color: var(--warm);
  border-color: var(--warm);
}

#newFactBtn:hover,
#newFactBtn:focus-visible {
  background-color: var(--warm-hover);
  border-color: var(--warm-hover);
}

.tweet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #f7f7f7;
  background: linear-gradient(145deg, #141414 0%, #272727 70%, #0b0b0b 100%);
  border: 1px solid #090909;
}

.tweet-btn:hover,
.tweet-btn:focus-visible {
  background: linear-gradient(145deg, #000000 0%, #202020 100%);
  color: #ffffff;
}

.tweet-mark {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.original-btn {
  border-width: 2px;
  border-color: #8b7e6c;
  color: #433a2f;
  background: linear-gradient(180deg, #f4efdf 0%, #e6d7bc 100%);
  margin-left: auto;
}

.original-btn:hover,
.original-btn:focus-visible {
  border-color: #766855;
  color: #2d261f;
  background: linear-gradient(180deg, #efe5d0 0%, #dccaa8 100%);
}

@media (max-width: 991px) {
  .chuck-media-wrap {
    min-height: 250px;
  }

  .chuck-photo {
    max-height: none;
    object-position: center 22%;
  }

  .fact-box {
    min-height: 150px;
  }
}

@media (max-width: 575px) {
  .page-wrap {
    width: min(97vw, 520px);
  }

  .fact-card {
    border-radius: 14px;
  }

  .content-pane {
    padding: 1rem;
  }

  .actions-left .action-btn {
    width: 100%;
  }

  .actions-left {
    width: 100%;
  }

  .original-btn {
    margin-left: 0;
    align-self: flex-end;
  }
}
