/* vpl · shell — the part every app looks like.
 *
 * One palette, one type scale, one page foundation. An app adds its own
 * workspace on top; it does not invent colours. The variables below are the
 * shell's: apps read them, apps do not redefine them.
 *
 * Copied into apps/<name>/vendor/ by ./stage (which ./serve and ./deploy run),
 * so every app ships with a copy and never with a link back into this folder.
 * Runtime independence is the point of the suite.
 */

/* vpl — one stylesheet, CSS variables (§4.4).
 * Warm paper, not a dashboard. Light is the default; dark is a variable swap. */
:root {
  --paper:        #faf8f4;
  --paper-2:      #f2eee6;   /* list pane */
  --paper-3:      #e9e3d8;   /* hairlines, hover */
  --ink:          #1f1d1a;
  --ink-2:        #55504a;
  --ink-3:        #8a8378;
  --line:         #e0d9cd;
  --mark:         #b4531f;   /* the only accent, used sparingly */
  --danger:       #a3352b;

  /* one colour language for sharing, in the list and at the top of the note:
   * anyone with the link / someone may edit / someone may only read */
  --tone-public: #a4553c;   /* terracotta, next to the accent */
  --tone-shared: #4a6b52;   /* moss */
  --tone-read:   #4a5f76;   /* slate */

  --sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', ui-serif, Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --list-w: 15rem;
  --radius: 8px;
  --bar-h: 2.75rem;
  --line-strong: #cdc3b2;
}

[data-theme='dark'] {
  --paper:        #1a1816;
  --paper-2:      #232120;
  --paper-3:      #33302c;
  --ink:          #f7f3ec;
  --ink-2:        #ddd6cb;
  --ink-3:        #b5ada1;   /* 7.97:1 on --paper */
  /* Edges must be obvious, not merely present. #8a8177 is 4.63:1 on
   * --paper and 4.19:1 on the sidebar surface. */
  --line:         #8a8177;
  --line-strong:  #a39a8f;
  --mark:         #ffb06b;
  --danger:       #ff9084;
  --tone-public: #dda07a;
  --tone-shared: #9fc4a8;
  --tone-read:   #a8c4e0;
}

/* In dark mode a hairline on a near-black surface vanishes, so inputs and
 * pane dividers get an explicit, visible border. Structural dividers are
 * drawn in --line-strong and made 2px: at 1px even a strong colour reads
 * as "faint" on a large dark field. */
[data-theme='dark'] input,
[data-theme='dark'] textarea {
  border-color: var(--line);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 2px;
}
