:root {
  color-scheme: dark;
  --bg: #0a0b09;
  --text: #f5f5f4;
  --muted: #a3a3a3;
  --faint: #8a8a8a;
  --line: #262626;
  --card: rgba(23, 23, 23, 0.45);
  --accent: #a8e6b0;
}

* { box-sizing: border-box; }

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

a { color: inherit; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--bg);
  padding: 0.4rem 0.7rem;
  border-radius: 0.4rem;
  z-index: 2;
}

.skip:focus { transform: none; }

.wrap {
  width: min(70rem, 100%);
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.top nav {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.top a { text-underline-offset: 0.2rem; }
.top a:hover { color: var(--text); }

h1 {
  margin: 1.75rem 0 0.75rem;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.lede, .help, .col-help, .empty { color: var(--muted); }

.col-help, .empty { margin: 0.2rem 0 0; font-size: 0.92rem; }

.columns {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.column, .export {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 0.6rem;
  padding: 0.95rem;
}

.column h2, .export h2 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.item-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.item {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #12130f;
}

.item p {
  margin: 0 0 0.6rem;
  overflow-wrap: anywhere;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.column form {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.85rem;
}

label { flex: 1 1 auto; min-width: 0; }

input, textarea {
  width: 100%;
  background: #12130f;
  color: var(--text);
  border: 1px solid #3a3a3a;
  border-radius: 0.5rem;
  padding: 0.7rem 0.75rem;
  font: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 11rem;
  resize: vertical;
  margin-top: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}

button {
  font: inherit;
  font-size: 0.95rem;
  border-radius: 0.5rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: var(--bg);
  border: 0;
  font-weight: 700;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

button:disabled { opacity: 0.4; cursor: not-allowed; }

.export { margin-top: 0.85rem; }

.export .help { margin: 0.45rem 0 0; }

.row-actions { margin-top: 0.75rem; }

.result { min-height: 1.25rem; margin: 0.65rem 0 0; }

.ok { color: var(--accent); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.9rem;
}

.site-footer a { color: var(--muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .column form { flex-direction: column; }
}

@media (min-width: 800px) {
  .wrap { padding: 2rem 1.5rem 2.5rem; }
  h1 { font-size: 3rem; margin-top: 2.5rem; }
}

@media (min-width: 900px) {
  .columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}
