:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #66736c;
  --line: #d8ddd7;
  --surface: #ffffff;
  --surface-soft: #f4f7f2;
  --accent: #276749;
  --accent-dark: #1d4f38;
  --gold: #d99a16;
  --orange: #c7672b;
  --focus: #1b6fb7;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 20px;
  max-width: 1280px;
}

.topbar h1,
.topbar p,
.review-header h2,
.review-header p,
.empty-state h3,
.empty-state p {
  margin: 0;
}

.topbar h1 {
  font-size: 30px;
  line-height: 1.1;
}

.topbar p,
.review-header p,
.helper-text,
.empty-state p {
  color: var(--muted);
}

.status-pill {
  align-items: center;
  background: #dcebe0;
  border: 1px solid #bed7c5;
  border-radius: 999px;
  color: #17452f;
  display: inline-flex;
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.workspace {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1280px;
}

.upload-panel,
.review-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-panel {
  align-self: start;
  padding: 16px;
}

.dropzone {
  align-items: center;
  background: var(--surface-soft);
  border: 1px dashed #9fb4a6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 180px;
  justify-content: center;
  padding: 18px;
  text-align: center;
}

.dropzone input {
  margin-top: 10px;
  max-width: 100%;
}

.drop-icon {
  align-items: center;
  background: #dfeae2;
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 26px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.drop-title {
  font-weight: 750;
}

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

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 6px;
  min-height: 42px;
  padding: 0 16px;
  width: 100%;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  margin-top: 12px;
}

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

.secondary-button {
  background: #202b24;
  color: #fff;
}

.secondary-button:disabled {
  background: #a7aea9;
  cursor: not-allowed;
}

.summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
}

.summary div {
  background: #f7f8f6;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.summary-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.summary strong {
  font-size: 22px;
}

.export-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.pro-export {
  background: #27486f;
}

.pro-export:hover {
  background: #203b5c;
}

.export-title {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.export-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.export-title input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.helper-text {
  font-size: 13px;
  line-height: 1.4;
  min-height: 18px;
}

.review-panel {
  min-height: 640px;
  overflow: hidden;
}

.review-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.review-header h2 {
  font-size: 20px;
}

.reading-panel {
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.reading-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reading-header h3,
.reading-header p {
  margin: 0;
}

.reading-header h3 {
  font-size: 17px;
}

.reading-header p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.reading-header span {
  background: #edf3ee;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #27543b;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  white-space: nowrap;
}

.reading-fields {
  display: grid;
  gap: 10px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-button {
  background: #f5f6f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 34px;
  padding: 0 10px;
}

.filter-button.active {
  background: #dfeae2;
  border-color: #aac8b2;
  color: #18462f;
}

.empty-state {
  padding: 84px 24px;
  text-align: center;
}

.empty-state h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.slide-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 166px);
  overflow: auto;
  padding: 12px;
}

.slide-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(74px, 90px) minmax(160px, 220px) minmax(0, 1fr);
  padding: 12px;
}

.slide-meta {
  align-content: start;
  display: grid;
  gap: 8px;
}

.slide-number {
  font-size: 22px;
  font-weight: 800;
}

.role-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  min-height: 26px;
  padding: 5px 8px;
  width: fit-content;
}

.role-chip.yellow {
  background: #fff5bf;
  color: #6b4a00;
}

.role-chip.orange {
  background: #ffe0ca;
  color: #69310d;
}

.remove-slide {
  background: #fff;
  border: 1px solid #d9c7bc;
  border-radius: 6px;
  color: #8a3515;
  font-size: 12px;
  min-height: 26px;
  padding: 0 8px;
  width: fit-content;
}

.remove-slide:hover {
  background: #fff2ea;
  border-color: #c58d6f;
}

.slide-controls {
  display: grid;
  gap: 10px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 5px;
}

select,
input,
textarea {
  background: #fff;
  border: 1px solid #cfd6d0;
  border-radius: 6px;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  line-height: 1.45;
  min-height: 112px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.text-editor-label {
  min-width: 0;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .review-header {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .slide-list {
    max-height: none;
  }

  .slide-card {
    grid-template-columns: 1fr;
  }
}
