:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #1d2521;
  --muted: #66736c;
  --line: #d8ded8;
  --accent: #1f6f5b;
  --accent-dark: #155342;
  --danger: #9f342b;
  --warning-bg: #fff4df;
  --shadow: 0 18px 50px rgba(29, 37, 33, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button.secondary {
  background: #e8ece8;
  color: var(--ink);
}

button.secondary:hover {
  background: #dce3dd;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.login-panel {
  width: min(460px, 100%);
  margin: 10vh auto 0;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 2rem;
  line-height: 1.1;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.25;
}

h3 {
  margin-bottom: 6px;
  font-size: 0.86rem;
}

.muted,
.book-meta,
dt {
  color: var(--muted);
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar-actions,
.action-row {
  display: flex;
  gap: 10px;
}

.state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

.reports-list {
  display: grid;
  gap: 16px;
}

.report-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(29, 37, 33, 0.06);
}

.cover-wrap {
  width: 92px;
  aspect-ratio: 2 / 3;
  background: #e9eee9;
  border-radius: 6px;
  overflow: hidden;
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--warning-bg);
  color: #6b4b0c;
  font-size: 0.78rem;
  font-weight: 800;
}

.meter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.meter-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

dt {
  font-size: 0.76rem;
  font-weight: 800;
}

dd {
  margin: 3px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.detail-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-block p {
  margin-bottom: 0;
}

.source-list {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.moderation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.card-error {
  margin: 10px 0 0;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding: 20px 0;
  }

  .topbar,
  .report-heading,
  .moderation-row {
    display: grid;
  }

  .topbar-actions,
  .action-row {
    width: 100%;
  }

  .topbar-actions button,
  .action-row button {
    flex: 1;
  }

  .report-card {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .cover-wrap {
    width: 68px;
  }

  .meter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
