:root {
  --ink: #1a1418;
  --muted: #6a5a62;
  --paper: #faf7f8;
  --surface: #ffffff;
  --accent: #b84d7a;
  --line: #eadfe4;
  --danger: #a33b3b;
  --ok: #2f6b4f;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}

.top, .tabs, main, .foot {
  width: min(1100px, calc(100% - 32px));
  margin-inline: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 28px 0 12px;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

h1 { font-size: 1.7rem; font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; margin-bottom: 10px; }

.status {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: right;
}
.status.is-ok { color: var(--ok); }
.status.is-err { color: var(--danger); }

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.panel { display: none; padding-bottom: 48px; }
.panel.is-active { display: block; }

.row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
}
@media (max-width: 800px) {
  .row { grid-template-columns: 1fr; }
}

.stack { min-width: 0; }

.card-form {
  display: grid;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.card-form input[type="text"],
.card-form input:not([type]),
.card-form input[type="date"],
.card-form input[type="url"],
.card-form input[name] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.card-form label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.card-form button,
.entity-list button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
}

.entity-list button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.entity-list button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, white);
}

.entity-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.entity-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.entity-list .title {
  font-weight: 650;
}

.entity-list .meta {
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-word;
}

.entity-list .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hint { color: var(--muted); font-size: 0.95rem; }
.hidden { display: none !important; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.foot a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; }
