:root {
  --bg: #0a0e14;
  --panel: #10161f;
  --panel-2: #161d29;
  --border: #1e293b;
  --text: #cbd5e1;
  --text-dim: #64748b;
  --cyan: #22d3ee;
  --low: #64748b;
  --medium: #22d3ee;
  --high: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.5;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

header.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

header.top h1 {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--cyan);
  margin: 0;
  text-transform: uppercase;
}

.last-updated {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid transparent;
}

.badge.low {
  color: var(--low);
  border-color: var(--low);
  background: rgba(100, 116, 139, 0.1);
}

.badge.medium {
  color: var(--medium);
  border-color: var(--medium);
  background: rgba(34, 211, 238, 0.1);
}

.badge.high {
  color: var(--high);
  border-color: var(--high);
  background: rgba(239, 68, 68, 0.12);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.card.high {
  border-left: 3px solid var(--high);
}

.card .meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.card .timestamp {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.card .text {
  white-space: pre-wrap;
  word-break: break-word;
}

.pinned-block {
  border: 1px solid var(--cyan);
  background: rgba(34, 211, 238, 0.06);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.pinned-label {
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.notify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.notify-banner.subscribed {
  border-color: var(--cyan);
}

.notify-banner .notify-btn {
  min-height: auto;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.notify-banner .notify-hint {
  display: block;
  color: var(--text-dim);
  font-size: 0.72rem;
  margin-top: 0.3rem;
}

.foot {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.rss-link {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-decoration: none;
}

.rss-link:hover {
  color: var(--cyan);
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 3rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
}

/* Admin */

.pin-input,
textarea,
select,
input[type="password"],
input[type="text"] {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem;
  border-radius: 6px;
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

button {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 6px;
  border: 1px solid var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  cursor: pointer;
  min-height: 3rem;
}

button:active {
  background: rgba(34, 211, 238, 0.25);
}

button.danger {
  border-color: var(--high);
  color: var(--high);
  background: rgba(239, 68, 68, 0.1);
}

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

.field {
  margin-bottom: 0.85rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.actions form {
  margin: 0;
}

.actions details {
  flex-basis: 100%;
  margin: 0;
}

.add-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.login-form {
  max-width: 320px;
  margin: 4rem auto;
  text-align: center;
}

.login-form .error {
  color: var(--high);
  margin-bottom: 0.75rem;
}

.clear-all-box {
  border: 1px solid var(--high);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 2rem;
}

.clear-all-box .field {
  margin-top: 0.5rem;
}

.edit-summary {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  min-height: 3rem;
  line-height: 1.3rem;
}

details[open] .edit-summary {
  border-color: var(--cyan);
  color: var(--cyan);
}

details summary::-webkit-details-marker {
  display: none;
}

.push-count {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: -0.5rem 0 1rem;
}

.edited-tag {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
}
