:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --surface: #16161a;
  --border: #2a2a30;
  --text: #e8e8e8;
  --text-dim: #9a9a9a;
  --accent: #6ea8fe;
  --accent-text: #04101f;
  --focus: #6ea8fe;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
}
.brand:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.card.center {
  text-align: center;
}

.card h1 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

.card p {
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

form { margin: 0; }

.field-label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

input[type="email"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

button.primary {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
button.primary:hover { filter: brightness(1.08); }

.link-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 0;
}
.link-btn:hover { color: var(--text); }
.link-btn.danger-text:hover { color: #ff6b6b; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topnav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
}
.topnav a:hover { color: var(--text); }

.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page h1 { font-size: 1.6rem; margin: 0; }
.page h2 { font-size: 1.1rem; margin: 0 0 1rem; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.back-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--text); }

.card {
  text-align: left;
  max-width: none;
}

details.card summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.9rem;
}
details.card[open] summary { margin-bottom: 1rem; }

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.inline-form-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}
.inline-form-row input { margin-bottom: 0; flex: 1; }
.inline-form-row button { width: auto; white-space: nowrap; }

select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
textarea { resize: vertical; }

button.danger {
  padding: 0.5rem 0.9rem;
  border: 1px solid #ff6b6b;
  border-radius: 8px;
  background: transparent;
  color: #ff6b6b;
  font-size: 0.85rem;
  cursor: pointer;
}
button.danger:hover { background: rgba(255, 107, 107, 0.1); }

.primary-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.primary-link:hover { text-decoration: underline; }

.empty-state {
  color: var(--text-dim);
  font-style: italic;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-list-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.project-list-item a:hover { border-color: var(--accent); }

.project-name { font-weight: 600; }
.project-meta { color: var(--text-dim); font-size: 0.85rem; }

.swipe-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.swipe-file-item { padding: 1.25rem; }

.swipe-file-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.tag-voice { border-color: #6ea8fe; color: #6ea8fe; }
.tag-swipe { border-color: #6ee7b7; color: #6ee7b7; }
.tag-other { border-color: var(--border); color: var(--text-dim); }

.swipe-file-preview {
  white-space: pre-wrap;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.swipe-file-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}
