:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

main {
  max-width: 960px;
  margin: 0 auto;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 12px;
}

h2 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

p {
  margin: 0 0 8px;
}

button,
.button {
  font: inherit;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #6b7280;
  border-radius: 6px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.button {
  background: #2b5bd7;
  border-color: #2b5bd7;
  color: #ffffff;
}

input,
select {
  font: inherit;
  min-height: 40px;
  max-width: 100%;
  padding: 0 8px;
  border: 1px solid #6b7280;
  border-radius: 6px;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

code {
  font-family: ui-monospace, Consolas, monospace;
}

.only-narrow {
  display: block;
  width: 100%;
}

.only-wide {
  display: none;
}

.apps ul li button {
  width: 100%;
  justify-content: flex-start;
}

.apps ul li + li {
  margin-top: 6px;
}

.key-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid #d1d5db;
}

.key-name {
  font-weight: 600;
}

.key-value {
  font-family: ui-monospace, Consolas, monospace;
}

.key-actions,
.edit-panel,
.notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.edit-panel input {
  flex: 1 1 200px;
  width: 100%;
}

.edit-panel.review p {
  width: 100%;
}

.empty {
  color: #6b7280;
}

.notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #6b7280;
  border-radius: 6px;
}

.notice.ok {
  border-color: #15803d;
}

.notice.error {
  border-color: #b91c1c;
}

[data-view='dashboard'] #signin-view {
  display: none;
}

[data-view='signin'] #dashboard-view {
  display: none;
}

@media (min-width: 640px) {
  .only-narrow {
    display: none;
  }

  .only-wide {
    display: block;
  }

  .layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
  }

  .key-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .key-name {
    flex: 0 0 180px;
  }

  .key-value {
    flex: 1 1 200px;
  }
}
