:root {
  --bg: #f6f3ec;
  --bg-tint: #efeae0;
  --ink: #1c1914;
  --muted: #5c574d;
  --line: #d7d0c3;
  --navy: #1e3a56;
  --navy-hover: #15283c;
  --font-serif: "Crimson Pro", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
}

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

html { font-size: 18px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2.5rem;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover { color: var(--navy-hover); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.wrap {
  width: min(32rem, 100%);
}

.back {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.back a { text-decoration: none; }

.back a:hover { text-decoration: underline; }

.card {
  background: var(--bg-tint);
  border: 1px solid var(--line);
  padding: 1.6rem 1.4rem 1.35rem;
}

h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#joke {
  margin: 0 0 1.35rem;
  min-height: 4.5rem;
  font-size: 1.15rem;
}

button {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  width: 100%;
  color: #fff;
  background: var(--navy);
  border: 0;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
}

button:hover { background: var(--navy-hover); }

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 600px) {
  html { font-size: 17px; }
  .card { padding: 1.3rem 1.1rem 1.15rem; }
}
