/*
 * This is a manifest file that'll be compiled into application.css.
 */

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

body {
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  color: #222;
  background: #fafafa;
  margin: 0;
}

header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 2rem;
}

nav {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

nav > a {
  font-size: 1.3rem;
  font-weight: bold;
  text-decoration: none;
  color: #111;
}

.nav-links { display: flex; gap: 1.5rem; }

.nav-links a {
  text-decoration: none;
  color: #555;
  font-size: 0.95rem;
  font-family: system-ui, sans-serif;
}

.nav-links a:hover { color: #111; }

main {
  max-width: 780px;
  margin: 2.5rem auto;
  padding: 0 2rem;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.85rem;
  font-family: system-ui, sans-serif;
  border-top: 1px solid #e0e0e0;
  margin-top: 4rem;
}

.notice {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

.alert {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

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

.post-list li {
  border-bottom: 1px solid #e8e8e8;
  padding: 1.8rem 0;
}

.post-list li:first-child { padding-top: 0; }

.post-list h2 { margin: 0 0 0.3rem; font-size: 1.4rem; }

.post-list h2 a { text-decoration: none; color: #111; }
.post-list h2 a:hover { text-decoration: underline; }

.post-meta {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.6rem;
}

.post-excerpt { margin: 0; color: #444; }

.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: #888;
  font-family: system-ui, sans-serif;
}

article h1 { font-size: 2rem; margin: 0 0 0.4rem; line-height: 1.3; }
article .post-meta { margin-bottom: 1.5rem; }

article .body {
  border-top: 1px solid #e8e8e8;
  padding-top: 1.5rem;
  white-space: pre-wrap;
}

.post-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  border-top: 1px solid #e8e8e8;
  padding-top: 1.5rem;
}

.post-actions a { color: #555; text-decoration: none; }
.post-actions a:hover { color: #111; }
.post-actions .delete-link { color: #c0392b; }
.post-actions .delete-link:hover { color: #922b21; }

.post-form h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }

.field { margin-bottom: 1.2rem; font-family: system-ui, sans-serif; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field input[type="text"],
.field input[type="datetime-local"],
.field textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: Georgia, serif;
  background: #fff;
  color: #222;
}

.field textarea { min-height: 260px; resize: vertical; }
.field input[type="checkbox"] { width: auto; margin-right: 0.4rem; }
.field .checkbox-label { display: flex; align-items: center; font-size: 0.95rem; }

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: #888;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.07);
}

.form-actions { margin-top: 1.5rem; display: flex; gap: 1rem; align-items: center; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: #333; }

.btn-secondary {
  background: transparent;
  color: #555;
  border: 1px solid #ccc;
}

.btn-secondary:hover { background: #f0f0f0; color: #222; }

#error_explanation {
  background: #fde8e8;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: #721c24;
}

#error_explanation h2 { margin: 0 0 0.5rem; font-size: 1rem; }
#error_explanation ul { margin: 0; padding-left: 1.2rem; }

.draft-badge {
  display: inline-block;
  background: #e0e0e0;
  color: #666;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
