/* Deliberately plain: this is an internal tool for a handful of people, not
   a marketing site, so there's no reason to reach for a framework or a
   build step. One small stylesheet, no JavaScript needed anywhere. */

:root {
  --ink: #1a1a1a;
  --muted: #666;
  --border: #ddd;
  --accent: #2452c8;
  --danger: #b3261e;
  --bg: #fafafa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.brand { font-weight: 700; text-decoration: none; color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

.muted { color: var(--muted); font-size: 14px; }

.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
}

h1 { margin-top: 0; }

.button-row { display: flex; gap: 12px; margin-top: 24px; }

.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  font-size: 15px;
  cursor: pointer;
}
.button-secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.button-danger { background: var(--danger); }
.button-small { padding: 6px 12px; font-size: 13px; }

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.inline-form { display: inline; }
.row-form { display: contents; }

form label { display: block; margin-top: 16px; margin-bottom: 4px; font-size: 14px; }
form input, form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
}
.input-narrow { width: 70px; }

.stacked-form { max-width: 420px; }

.error { color: var(--danger); }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.app-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
}
.app-card:hover { border-color: var(--accent); }
.app-card h2 { margin: 0 0 8px; font-size: 18px; }
.app-card p { margin: 0; color: var(--muted); font-size: 14px; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table .actions { display: flex; gap: 6px; }

.book-list { columns: 2; column-gap: 32px; }
.book-list li { margin-bottom: 6px; }

.book-reader .book-text {
  white-space: pre-wrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
  margin-top: 24px;
}
.book-nav { margin-top: 24px; }
