:root {
  color-scheme: light;
  --bg: #f3efe7;
  --panel: #ffffff;
  --text: #171717;
  --muted: #68635b;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --border: #ddd4c4;
  --shadow: 0 18px 50px rgba(23, 23, 23, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(17, 94, 89, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 26%),
    var(--bg);
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
  font-size: 0.8rem;
}

h1, h2, h3 {
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
  margin: 0;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
}

textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  background: #fffdf8;
}

textarea {
  resize: vertical;
  min-height: 240px;
}

.actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

button,
.button-link,
.secondary {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button,
.button-link {
  background: var(--accent);
  color: white;
}

.secondary {
  background: #e8f3f1;
  color: var(--accent-strong);
}

.parsing-indicator {
  display: none;
  color: var(--accent-strong);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
}

.htmx-request .parsing-indicator,
.htmx-request.parsing-indicator {
  display: inline-flex;
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.summary-grid article {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #fcfaf6);
}

.aggregate-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.aggregate-toolbar form {
  margin: 0;
}

.album-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.album-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fffdf8;
}

.album-card img,
.album-card-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e8e0d4;
}

.album-card > div {
  padding: 12px;
}

.album-card p {
  margin: 4px 0 0;
}

.album-card-placeholder {
  background: linear-gradient(135deg, #e8e0d4, #f4eee4);
}

.stat {
  display: block;
  font-size: 2rem;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 800;
  margin-bottom: 8px;
}

.correction-list,
.ballot-list {
  display: grid;
  gap: 14px;
}

.preview-votes {
  list-style: none;
  padding-left: 0;
}

.preview-votes li,
.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.preview-votes p,
.audit-row p {
  margin: 4px 0 0;
}

.correction-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fcfbf7;
}

.correction-card p,
.panel p,
li {
  color: var(--muted);
}

.suggestions {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.95rem;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-row,
.editing-entry {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fcfbf7;
}

.inline-editor {
  display: grid;
  gap: 10px;
}

.compact .audit-row {
  background: #fffdf8;
}

.review-needed-list {
  display: grid;
  gap: 10px;
}

.review-needed-card {
  display: grid;
  gap: 10px;
}

.review-needed-item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffdf8;
}

.error {
  color: #9f1239;
  background: #fff1f2;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
}

ol {
  margin: 0;
  padding-left: 1.25rem;
}

ol li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1100px);
    padding-top: 20px;
  }

  h1 {
    max-width: none;
  }
}
