:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f7faf9;
  --ink: #17211f;
  --muted: #5d6d68;
  --line: #d7e1de;
  --accent: #087f6a;
  --accent-dark: #056354;
  --accent-soft: #e9f7f2;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  margin: 0;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.privacy-strip {
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid #a9dcca;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.privacy-strip strong {
  color: var(--accent-dark);
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.privacy-strip p,
.limit-note,
.status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.drop-zone {
  align-items: center;
  background: #fff;
  border: 1px dashed #91aaa3;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 150px;
  padding: 20px;
  text-align: center;
}

.drop-zone[data-dragging="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.drop-zone h2 {
  font-size: 18px;
  letter-spacing: 0;
  margin: 0;
}

.drop-zone input {
  max-width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

button {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 12px;
}

button:hover,
button:focus-visible {
  border-color: var(--accent);
  outline: 2px solid transparent;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

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

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

.status {
  min-height: 21px;
}

.status[data-kind="error"] {
  color: var(--danger);
  font-weight: 700;
}

.workspace {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 0;
  padding: 14px;
}

.panel h2,
.panel h3 {
  font-size: 16px;
  letter-spacing: 0;
  margin: 0 0 10px;
}

.table-list {
  display: grid;
  gap: 6px;
  max-height: 480px;
  overflow: auto;
}

.table-list button {
  justify-content: flex-start;
  overflow-wrap: anywhere;
  text-align: left;
  width: 100%;
}

.table-list button[aria-current="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.details {
  display: grid;
  gap: 14px;
}

.scroll-table {
  border: 1px solid var(--line);
  border-radius: 5px;
  max-height: 390px;
  overflow: auto;
}

table {
  border-collapse: collapse;
  min-width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.45;
  max-width: 320px;
  overflow-wrap: anywhere;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef4f2;
  color: #42534e;
  font-weight: 800;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

td:last-child,
th:last-child {
  border-right: 0;
}

tr:last-child td {
  border-bottom: 0;
}

.summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: -4px 0 0;
}

.empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  padding: 12px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .shell {
    padding: 10px;
  }

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

  .table-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
  }

  .table-list button {
    flex: 0 0 auto;
    width: auto;
  }
}
