/* ============================================================
   Tertius — Public page styles
   ============================================================ */

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
}

a {
  color: #0070f3;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================
   Container
   ============================================================ */

.landing,
.archive,
.issue {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ============================================================
   Landing page
   ============================================================ */

.landing-header {
  margin-bottom: 40px;
}

.landing-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}

.landing-description {
  font-size: 1.125rem;
  color: #555;
  margin: 0;
}

.signup-section {
  margin-bottom: 48px;
}

.signup-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 16px;
}

/* ============================================================
   Signup form
   ============================================================ */

.signup-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
}

.signup-form input[type="email"]:focus {
  border-color: #0070f3;
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.15);
}

.signup-form button {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  background: #0070f3;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.signup-form button:hover {
  background: #0060df;
}

/* ============================================================
   Archive
   ============================================================ */

.archive-header {
  margin-bottom: 32px;
}

.archive-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0 0;
}

.back-link {
  font-size: 0.9rem;
  color: #555;
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-item {
  padding: 20px 0;
  border-bottom: 1px solid #e5e7eb;
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-item .post-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  display: block;
  margin-bottom: 4px;
}

.archive-item .post-title:hover {
  color: #0070f3;
  text-decoration: none;
}

.post-preview {
  font-size: 0.95rem;
  color: #555;
  margin: 4px 0 8px;
}

.post-date {
  font-size: 0.85rem;
  color: #888;
}

.recent-posts h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 16px;
}

/* ============================================================
   Issue / single post
   ============================================================ */

.issue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 8px;
}

.issue-content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.issue-content h1,
.issue-content h2,
.issue-content h3,
.issue-content h4 {
  line-height: 1.3;
}

.issue-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.issue-content pre {
  overflow-x: auto;
  padding: 16px;
  background: #f6f8fa;
  border-radius: 6px;
  font-size: 0.9rem;
}

.issue-content blockquote {
  border-left: 3px solid #d1d5db;
  margin: 0;
  padding-left: 20px;
  color: #555;
}

/* ============================================================
   Subscribe CTA (bottom of issue)
   ============================================================ */

.subscribe-cta {
  margin-top: 56px;
  padding: 32px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
}

.subscribe-cta h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.subscribe-cta p {
  color: #555;
  margin: 0 0 20px;
}

.subscribe-cta .signup-form {
  justify-content: center;
}

/* ============================================================
   Utility
   ============================================================ */

.hint {
  font-size: 0.875rem;
  color: #888;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  background: #0070f3;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.btn:hover {
  background: #0060df;
  text-decoration: none;
  color: #fff;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 600px) {
  .landing-header h1 {
    font-size: 2rem;
  }

  .signup-form {
    flex-direction: column;
  }

  .signup-form input[type="email"],
  .signup-form button {
    width: 100%;
  }

  .issue-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   ARC Download page
   ============================================================ */

.download-page { max-width: 480px; margin: 48px auto; padding: 0 20px; font-family: inherit; }
.download-cover { text-align: center; margin-bottom: 24px; }
.download-cover-img { max-width: 200px; border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.download-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 8px; }
.download-description { color: #555; margin: 0 0 24px; line-height: 1.6; }
.download-buttons { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.download-btn { display: block; padding: 14px 20px; background: #1a1a1a; color: #fff; text-align: center; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 1rem; }
.download-btn:hover { background: #333; }
.kindle-section { border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 32px; overflow: hidden; }
.kindle-summary { padding: 14px 16px; cursor: pointer; font-weight: 600; user-select: none; }
.kindle-steps { padding: 0 16px 16px; }
.kindle-steps ol { padding-left: 20px; margin: 0 0 12px; line-height: 1.7; }
.kindle-note { font-size: .875rem; color: #666; margin: 0; }
.download-footer { border-top: 1px solid #f0f0f0; padding-top: 16px; text-align: center; font-size: .875rem; color: #888; }
.download-error { text-align: center; margin-top: 80px; }
