@font-face {
  font-family: Fraunces;
  src: url("fonts/fraunces-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url("fonts/fraunces-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #e7e1d6;
  --card: #fbf7f1;
  --ink: #1c1915;
  --muted: #6f675e;
  --line: #e5dccf;
  --gold: #8a6820;
  --punch: #c83c32;
  --shadow: 0 24px 60px rgba(72, 52, 24, 0.08);
  --serif: Fraunces, "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  border-radius: 999px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header, .dateline, .banner, .card, .countdown, .week, .site-footer {
  width: min(680px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.logo { width: 46px; height: 46px; flex: none; }
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.18rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-header nav { display: flex; gap: 18px; font-weight: 500; }
.site-header nav a { text-decoration: none; }

.dateline {
  margin: 22px auto 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.banner {
  margin: 0 auto 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 34px 32px 28px;
}
.kicker {
  margin: 0 0 12px;
  text-align: center;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.15rem, 6vw, 3.15rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.lede, .holding {
  color: #3f3a34;
  text-align: center;
}
.punchline {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  color: var(--punch);
  line-height: 1.25;
}
html.js .punchline:not(.is-revealed) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.reveal-btn {
  display: none;
  margin: 18px auto 0;
  border: 0;
  background: transparent;
  color: var(--punch);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
}
html.js .reveal-btn { display: block; }
html.js .reveal-btn[hidden] { display: none; }

.meme {
  position: relative;
  margin: 22px 0 0;
  border-radius: 16px;
  overflow: hidden;
  background: #123246;
}
.meme img { display: block; width: 100%; height: auto; }
.meme-cover {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  border: 0;
  background: linear-gradient(to bottom, rgba(12, 18, 24, 0) 0%, rgba(12, 18, 24, 0.35) 16%, #0c1218 48%, #0c1218 100%);
  color: white;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 26px;
  font-weight: 700;
}
html.js .meme.is-secret .meme-cover { display: flex; }
.meme.is-square .meme-cover {
  height: 32%;
  background: linear-gradient(to bottom, rgba(251, 247, 241, 0) 0%, #fbf7f1 18%, #fbf7f1 100%);
  color: var(--ink);
}

.reactions, .share, .admin-actions, .signup-row, .day-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.reactions { margin-top: 18px; }
.pill, .share a, .share button, .ghost, .admin-actions button, .look-form button, .login-form button, .signup button, .approve {
  border-radius: 999px;
  border: 1px solid #e3d8c8;
  background: white;
  padding: 9px 14px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.pill[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.share { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.day-nav { justify-content: space-between; margin-top: 18px; font-weight: 500; }
.day-nav a { text-decoration: none; }
.waiting { color: var(--muted); font-size: 0.92rem; }

.countdown {
  margin: 26px auto;
  text-align: center;
  color: var(--muted);
}
.countdown strong { color: var(--ink); font-weight: 700; }

.week { margin-top: 8px; margin-bottom: 28px; }
.week h2, .archive-card h2, .admin-card h2 {
  margin: 0 0 12px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list a {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.archive-list time { color: var(--muted); }
.archive-list em { font-family: var(--serif); font-style: italic; color: #4a433c; }

.signup, .archive-card, .login-card, .admin-intro { margin-top: 8px; margin-bottom: 18px; }
.signup h2, .archive-card h1, .login-card h1, .admin-intro h1 {
  text-align: left;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--ink);
  font-weight: 700;
}
.signup p, .style-note, .stats, .joke-id { color: var(--muted); }
.signup-row { justify-content: stretch; margin-top: 16px; }
.signup-row input, .login-form input, textarea, select {
  width: 100%;
  border: 1px solid #e3d8c8;
  background: white;
  border-radius: 999px;
  padding: 12px 16px;
}
textarea { border-radius: 16px; min-height: 74px; resize: vertical; }
.signup-row input { flex: 1; }
.signup button, .approve, .login-form button, .admin-actions button[type="submit"]:first-child, .look-form button[type="submit"]:not(.ghost) {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.signup-row button { white-space: nowrap; }
.form-status { min-height: 1.4em; }
.form-status.is-error { color: var(--punch); }
.text-link { font-weight: 700; }

.site-footer {
  padding: 10px 0 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}
.site-footer p { margin: 4px 0; }

.admin-top, .admin-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.admin-list { display: grid; gap: 18px; width: min(680px, calc(100% - 32px)); margin: 0 auto 28px; }
.admin-card h2 { color: var(--ink); letter-spacing: -0.03em; text-transform: none; font-family: var(--serif); font-size: 1.45rem; }
.admin-preview { border-radius: 16px; margin: 8px 0 14px; background: #123246; }
.look-form, .edit-form { display: grid; gap: 10px; margin-top: 12px; }
.look-form { grid-template-columns: repeat(3, 1fr); }
.look-form label, .edit-form label, .login-form label { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.look-form button, .edit-form .admin-actions { grid-column: 1 / -1; }
.badge { border-radius: 999px; padding: 4px 10px; background: #efe6d4; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.badge-live { background: #1c1915; color: white; }
.badge-pending { background: #f3d3a2; }
.month { border-top: 1px solid var(--line); padding: 8px 0; }
.month summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.login-form { display: grid; gap: 10px; max-width: 360px; }
.prompt { margin: 12px 0; }
.prompt pre { white-space: pre-wrap; font-size: 0.82rem; background: white; border-radius: 16px; padding: 12px; max-height: 240px; overflow: auto; }
input[type="file"] { border-radius: 16px; padding: 10px; background: white; }

@media (max-width: 640px) {
  .card { padding: 26px 18px 22px; border-radius: 22px; }
  .site-header { align-items: flex-start; }
  .brand small { letter-spacing: 0.08em; }
  .archive-list a { grid-template-columns: 3.4rem 1fr; }
  .signup-row, .look-form { display: grid; grid-template-columns: 1fr; }
  .admin-top, .admin-card-head { display: grid; }
}

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