:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #151515;
  --panel-2: #202020;
  --text: #f4f4f4;
  --muted: #a7a7a7;
  --line: #343434;
  --accent: #0a84ff;
  --danger: #ff453a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .02em;
}

h1,
h2 {
  margin: 0;
}

.actions,
.formActions,
.listHeader {
  display: flex;
  align-items: center;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: var(--panel-2);
}

button.danger {
  background: var(--danger);
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  min-height: calc(100vh - 101px);
}

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

form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  color: var(--text);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.stories {
  padding: 24px;
}

.listHeader {
  justify-content: space-between;
  margin-bottom: 18px;
}

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

.story {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 16px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.story img {
  width: 150px;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--panel-2);
}

.story h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.story p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}

.storyActions {
  display: grid;
  align-content: start;
  gap: 8px;
}

@media (max-width: 860px) {
  .topbar,
  .layout {
    display: block;
  }

  .actions {
    margin-top: 18px;
    flex-wrap: wrap;
  }

  .editor {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .story {
    grid-template-columns: 96px 1fr;
  }

  .story img {
    width: 96px;
    height: 86px;
  }

  .storyActions {
    grid-column: 1 / -1;
    display: flex;
  }
}
