/* Jean — table-talk aesthetic. Dark, muted, high contrast, easy on the eyes.
   Mobile/tablet first: big tap targets, one-hand thumb operation, no hover-only
   interactions. */

:root {
  --bg: #141210;
  --panel: #1e1b18;
  --panel-2: #262220;
  --ink: #ece6dd;
  --ink-dim: #a89f92;
  --line: #35302b;
  --accent: #c9a434;      /* muted gold, borrowed from the brand */
  --accent-ink: #1a1408;
  --danger: #a5563f;

  /* classification pills */
  --thought: #6b8fa3;
  --task: #b98a3e;
  --followup: #a76a9e;
  --person: #6f9e6a;
  --decision: #b5794b;
  --unknown: #7a7268;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}

h1 {
  font-size: 1.8rem;
  font-weight: normal;
  margin: 0.2em 0 0.6em;
  letter-spacing: 0.01em;
}

a { color: var(--accent); text-decoration: none; }

/* --- top nav --- */
.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.topnav a { color: var(--ink-dim); padding: 8px 2px; }
.topnav a.here { color: var(--ink); border-bottom: 2px solid var(--accent); }
.topnav .logout { margin-left: auto; }
.topnav .logout button {
  background: none; border: none; color: var(--ink-dim);
  font-family: inherit; font-size: 1rem; cursor: pointer; padding: 8px;
}

/* --- toast --- */
.toast {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* --- buttons --- */
button, .primary {
  min-height: 48px;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  border-radius: 12px;
  cursor: pointer;
}
button.primary, .primary[type="submit"] {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 12px 28px;
  font-weight: bold;
}
button.primary:active { transform: translateY(1px); }

/* --- login --- */
.login { padding-top: 12vh; text-align: center; }
.login input[type="password"] {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto 16px;
  padding: 16px;
  font-size: 1.3rem;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
}
.login .err { color: var(--danger); }

/* --- capture screen --- */
.capture { display: flex; flex-direction: column; min-height: 70vh; }
.capture textarea {
  flex: 1;
  min-height: 45vh;
  width: 100%;
  padding: 16px;
  font-size: 1.25rem;
  line-height: 1.5;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  resize: vertical;
}
.capture textarea::placeholder { color: var(--ink-dim); }
.capture-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.mic {
  width: 64px;
  height: 64px;
  min-height: 64px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 1.6rem;
  flex: 0 0 auto;
}
.mic.listening {
  border-color: var(--accent);
  animation: pulse 1.3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,164,52,0.5); }
  50% { box-shadow: 0 0 0 10px rgba(201,164,52,0); }
}
.capture .primary { margin-left: auto; }
.mic-hint { color: var(--ink-dim); font-size: 0.95rem; }

/* --- log --- */
.log-filter { margin-bottom: 14px; }
.log-filter a { color: var(--ink-dim); }
.empty { color: var(--ink-dim); padding: 24px 0; }
ul.captures { list-style: none; margin: 0; padding: 0; }
ul.captures li { border-bottom: 1px solid var(--line); }
.row {
  display: block;
  padding: 16px 4px;
  color: var(--ink);
}
.row .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.row .when { color: var(--ink-dim); font-size: 0.9rem; }
.row .text { color: var(--ink); }

/* --- pills --- */
.pill {
  display: inline-block;
  font-family: Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  color: #12100e;
  background: var(--unknown);
}
.pill-thought  { background: var(--thought); }
.pill-task     { background: var(--task); }
.pill-followup { background: var(--followup); }
.pill-person   { background: var(--person); }
.pill-decision { background: var(--decision); }
.pill-unknown  { background: var(--unknown); }

/* --- detail --- */
.back, .detail .back { display: inline-block; margin-bottom: 12px; color: var(--ink-dim); }
.detail-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.detail-head .conf, .detail-head .when { color: var(--ink-dim); font-size: 0.9rem; }
.edit { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.edit label { color: var(--ink-dim); font-size: 0.85rem; letter-spacing: 0.05em; }
.edit textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  font-size: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
}
.edit .primary { align-self: flex-start; margin-top: 6px; }
.reason {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--ink-dim);
}
.tags .tag {
  display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.85rem; color: var(--ink-dim);
}
.reclassify { margin: 22px 0; }
.reclassify > label { color: var(--ink-dim); font-size: 0.85rem; letter-spacing: 0.05em; }
.reclass-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.reclass-buttons form { margin: 0; }
.reclass-buttons .pill {
  border: none; cursor: pointer; min-height: 40px; font-size: 0.85rem;
}
.reclass-buttons .pill.current { outline: 2px solid var(--ink); opacity: 0.6; cursor: default; }
.detail-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-foot button {
  background: var(--panel-2); color: var(--ink-dim);
  border: 1px solid var(--line); padding: 10px 22px;
}
