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

body {
  font-family: Georgia, "Times New Roman", serif;
  background-color: #8f87fe;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
  background-image: url('/static/media/waves.png');
  background-repeat: repeat;
  background-size: 350px 350px; /* Optional: control tile size */
}

/* ── Content wrapper ── */
.wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}

/* ── Masthead ── */
.masthead {
  position: relative;
  border-bottom: 4px double #1a1a1a;
  padding: 1.5rem 1.25rem 1rem;
  text-align: center;
}

.masthead-date {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.5rem;
}

.masthead-name {
  font-size: clamp(2.4rem, 10vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  font-style: italic;
}

.masthead-logo {
  width: 180px;
}

.masthead-rule {
  border: none;
  border-top: 1px solid #1a1a1a;
  margin: 0.75rem 0 0.5rem;
}

.masthead-motto {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
}

.masthead-links {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #555;
  font-style: italic;
}

.masthead-links a {
  color: #555;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.masthead-links a:hover {
  color: #1a1a1a;
}

/* ── Story list ── */
.page {
  padding: 0 1.25rem;
}

/* ── Story ── */
.story {
  border-bottom: 1px solid #ccc;
  padding: 2rem 0;
}

.story:last-child {
  border-bottom: none;
  padding-bottom: 3rem;
}

.story:first-child {
  border-bottom: 3px double #1a1a1a;
}

.story-photo {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  margin-bottom: 0.5rem;
}

.story-image {
  display: block;
  width: 100%;
  display: block;
  object-fit: contain;
  max-height: 24rem;
}

.story-photo-credit {
  font-size: 0.8rem;
  line-height: 1.75;
  color: #222;
  font-style: italic;
  text-align: right;
}

.story-headline {
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.story-byline {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 0.35rem 0;
  margin-bottom: 1rem;
}

.story-permalink {
  text-decoration: none;
}

.story-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #222;
}

.story-facts {
  font-size: 0.8rem;
  line-height: 1.75;
  color: #222;
  font-style: italic;
}

/* Rich text resets */
.story-body p {
  margin-bottom: 1em;
}
.story-body p:last-child {
  margin-bottom: 0;
}
.story-body h1,
.story-body h2,
.story-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.25em 0 0.5em;
}
.story-body ul,
.story-body ol {
  margin: 0.75em 0 0.75em 1.5em;
}
.story-body blockquote {
  border-left: 3px solid #1a1a1a;
  margin: 1em 0;
  padding: 0.25em 1em;
  font-style: italic;
  color: #444;
}
.story-body a {
  color: #1a1a1a;
}

/* ── Empty state ── */
.empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #777;
  font-style: italic;
  font-size: 1.1rem;
}

.pagination {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 2rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.inactive-page {
  opacity: 0.4;
}

.page {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

/* ── Form ── */
.field {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.35rem;
}

input[type="text"],
textarea {
  width: 100%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  color: #1a1a1a;
  border: 1px solid #bbb;
  border-radius: 2px;
  padding: 0.6rem 0.75rem;
  outline: none;
  transition: border-color 0.15s;
  background: #fafafa;
}

input[type="text"]:focus,
textarea:focus {
  border-color: #665fd1;
  background: #fff;
}

textarea {
  resize: vertical;
}

.help-text {
  font-size: 0.8rem;
  color: #777;
  margin-top: 0.3rem;
  font-style: italic;
}

.error-list {
  list-style: none;
  color: #b91c1c;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.submit-btn {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 0.7rem 2rem;
  cursor: pointer;
  border-radius: 2px;
}

.submit-btn:hover {
  background: #665fd1;
}
