:root {
  --bg: #f5f6f3;
  --panel: #ffffff;
  --text: #1c2224;
  --muted: #677176;
  --line: #d9ded9;
  --accent: #007782;
  --accent-dark: #005f68;
  --danger: #b23a48;
  --danger-wash: #fae8eb;
  --wash: #e7f2f0;
  --shadow: 0 12px 34px rgba(21, 35, 38, .09);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.toolbar,
.editor,
.list-pane {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.toolbar-actions,
.editor-actions {
  display: flex;
  gap: 8px;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 14px;
  align-items: start;
}

.list-pane,
.editor {
  padding: 14px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0;
}

.muted {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.subscription {
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.subscription[data-active="true"] {
  color: #1f7a38;
}

.alerts {
  display: grid;
  gap: 10px;
}

.alert-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fbfcfb;
}

.alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.alert-title {
  font-weight: 760;
  line-height: 1.25;
  word-break: break-word;
}

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

.pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  background: #fff;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(0, 119, 130, .22);
  outline-offset: 1px;
  border-color: var(--accent);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 6px;
  min-height: 40px;
  padding: 0 13px;
  font: inherit;
  font-weight: 720;
  cursor: pointer;
  white-space: nowrap;
}

.primary {
  background: var(--accent);
  color: #fff;
}

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

.ghost {
  background: var(--wash);
  color: var(--accent-dark);
}

.danger {
  background: var(--danger-wash);
  color: var(--danger);
}

.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status,
.empty {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  body {
    background: var(--panel);
  }

  .shell {
    padding: 0;
  }

  .toolbar,
  .list-pane,
  .editor {
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .toolbar {
    margin-bottom: 0;
  }

  .content {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .toolbar,
  .alert-head,
  .editor-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions button {
    flex: 1;
  }

  input,
  select,
  button {
    min-height: 48px;
  }
}