:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #637083;
  --line: #d9e0e7;
  --primary: #25665e;
  --primary-dark: #1c4d47;
  --warn: #fff4d7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--primary);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

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

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

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

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

button,
.button {
  display: inline-block;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.small {
  width: fit-content;
  padding: 8px 12px;
}

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

.secondary {
  background: #425466;
}

.danger {
  background: #a33d3d;
}

.danger:hover {
  background: #7d2f2f;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.file-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.9rem;
}

.message,
.notice,
.flash {
  padding: 12px 14px;
  border-radius: 6px;
  background: #eef7f5;
  border: 1px solid #cbe3de;
  margin: 16px 0;
}

.notice {
  background: var(--warn);
  border-color: #ead58f;
}

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

.split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 28px;
}

.choice {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: #fbfcfd;
}

.choice:hover {
  border-color: var(--primary);
}

.choice strong {
  font-size: 1.2rem;
}

.choice span {
  color: var(--muted);
}

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .topbar,
  .split {
    align-items: flex-start;
    flex-direction: column;
  }

  table {
    display: block;
    overflow-x: auto;
  }

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

  .file-row {
    grid-template-columns: 1fr;
  }
}
