/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #fdfdfc;
  --fg: #1d1d1f;
  --muted: #6b6b70;
  --accent: #2f5bd3;
  --border: #e4e4e7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --fg: #ececee;
    --muted: #9a9aa2;
    --accent: #7c9cf5;
    --border: #2c2c30;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, sans-serif;
}

a { color: var(--accent); }

.site-header, main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; font-size: 1.25rem; color: var(--fg); text-decoration: none; }

.post-summary { padding-block: 1rem; border-bottom: 1px solid var(--border); }
.post-summary h2 { margin-bottom: 0; }
.post-summary h2 a { color: var(--fg); text-decoration: none; }

.meta { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0; }

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.tags a { font-size: 0.85rem; text-decoration: none; }

.flash { padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 6px; }
.errors { color: #c0392b; }

.post-form { display: flex; flex-direction: column; gap: 0.5rem; }
.post-form input[type=text], .post-form textarea {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}
.post-form input[type=submit] { align-self: flex-start; margin-top: 0.5rem; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table td { padding: 0.5rem 0.25rem; border-bottom: 1px solid var(--border); }
.admin-table .actions { display: flex; gap: 0.75rem; justify-content: flex-end; align-items: center; }
.admin-table form { margin: 0; }
