/* notes — document-style workspace: list pane + full-page editor */

.notes-layout {
  display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 18px;
  min-height: 62vh; }

/* ---- document list ---- */
.doc-list { display: flex; flex-direction: column; gap: 8px; align-content: start; min-width: 0; }
.doc-new { justify-content: center; }
.doc-row {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.doc-row:hover { border-color: var(--border-control); background: var(--bg-elev-2); }
.doc-row.active {
  background: var(--accent-soft);
  border-color: var(--accent); }
.doc-row-title {
  font-weight: 600; font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row-meta { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; min-width: 0; }
.doc-row-date { flex-shrink: 0; font-family: var(--mono); font-size: 10px; color: var(--text-faint); }
.doc-row-snippet {
  font-size: 11.5px; color: var(--text-dim); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row-snippet.empty { font-style: italic; color: var(--text-faint); }

/* ---- editor: a sheet of paper ---- */
.doc-editor {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden; }
.doc-editor-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-soft); }
.doc-back { display: none; } /* back button is a phone affordance */
.doc-title {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-family: var(--font-serif); font-size: 23px; font-weight: 600;
  letter-spacing: -0.015em; color: var(--text); }
.doc-title::placeholder { color: var(--text-faint); }
.doc-body {
  flex: 1;
  width: 100%;
  background: transparent; border: none; outline: none; resize: none;
  padding: 18px 22px 22px;
  /* The one long-form surface in the app: serif, generous measure, open leading. */
  font-family: var(--font-serif); font-size: 16.5px; line-height: 1.7; color: var(--text);
  max-width: 74ch; min-height: 46vh; }
.doc-body::placeholder { color: var(--text-faint); }
.doc-editor-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px; color: var(--text-faint); }
.doc-count { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* empty state */
.doc-empty { align-items: center; justify-content: center; gap: 12px; padding: 40px 20px; }
.doc-empty-icon { color: var(--text-faint); opacity: 0.7; }
.doc-empty p { margin: 0; color: var(--text-dim); font-size: 13.5px; }

/* ---- phones: one pane at a time ---- */
@media (max-width: 760px) {
  .notes-layout { grid-template-columns: 1fr; min-height: 0; }
  .notes-layout.editing .doc-list { display: none; }
  .notes-layout.editing .doc-back { display: grid; }
  .doc-body { min-height: 52vh; }
}
