:root {
  color-scheme: light dark;
  --bg: #f3f1eb;
  --ink: #1a1916;
  --card: #fffcf7;
  --line: #e4dfd4;
  --muted: #6d675c;
  --accent: #1f4d3a;
  --accent-ink: #f4f7f2;
  --danger: #8d2f2f;
  --shadow: 0 1px 0 rgba(26, 25, 22, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141613;
    --ink: #ece7dc;
    --card: #1d211c;
    --line: #2e342c;
    --muted: #a39c8e;
    --accent: #c8f0a8;
    --accent-ink: #14210f;
    --danger: #ffb4b4;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 "Segoe UI", system-ui, sans-serif;
}

button, input { font: inherit; }

.panel {
  width: min(28rem, calc(100% - 2rem));
  margin: 8vh auto 3rem;
}

.panel.wide {
  width: min(56rem, calc(100% - 2rem));
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  margin: 0.75rem 0 1.25rem;
}

form, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

input {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

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

form button { width: 100%; margin-top: 0.85rem; }

.error {
  min-height: 1.2em;
  margin: 0.7rem 0 0;
  color: var(--danger);
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.8rem;
}

.card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.card-top, .id-row, .actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-top { justify-content: space-between; }

.badge {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.meta {
  margin: 0.45rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.id-row {
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

code {
  font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  font-size: 0.95rem;
}

.actions button { flex: 1; }

.copy {
  min-height: 36px;
  padding: 0.2rem 0.6rem;
}
