/* Awe Well · web journal. Palette mirrors the app: cream ground, plum ink,
   sunset accent. Reading type is Georgia at book measure, same as iPad. */

@font-face {
  font-family: 'Fraunces';
  src: url('./fraunces-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #FBF7F1;
  --ink: #2B2440;
  --muted: #6E6787;
  --faint: rgba(31, 41, 55, 0.45);
  --line: rgba(31, 41, 55, 0.12);
  --card: rgba(31, 41, 55, 0.05);
  --accent: #C75D3C;
  --accent-text: #FFF8EF;
  --sel: rgba(199, 93, 60, 0.09);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 30px;
  margin-bottom: 18px;
}
.wordmark.small { font-size: 19px; margin: 0; }

/* ---- centered states (loading / signed out / gate) ---- */
.center {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  gap: 14px;
}
.center h1 { font-size: 24px; font-weight: 600; text-wrap: balance; }
.spark { color: var(--accent); font-size: 22px; }
.quiet { color: var(--muted); }
.lede { max-width: 46ch; }
.fine { font-size: 13.5px; }
.fine a { color: var(--muted); }

.cta {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  margin-top: 6px;
}
.cta.ghost {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
}
.cta:focus-visible, .linkish:focus-visible, .row:focus-visible,
.excerpt:focus-visible, #search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.linkish {
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- journal ---- */
#view-journal { height: 100%; display: flex; flex-direction: column; }
.bar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.bar-title { color: var(--muted); flex: 1; }
.room { flex: 1; min-height: 0; display: flex; }

.list {
  width: 330px;
  flex: none;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 16px 12px 24px;
}
#search {
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  width: 100%;
  padding: 9px 13px;
  border: none;
  border-radius: 11px;
  background: var(--card);
  margin-bottom: 10px;
}
.row {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  border-radius: 11px;
  padding: 11px 12px;
  cursor: pointer;
}
.row.sel { background: var(--sel); }
.row .d {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
}
.row .s {
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pane { flex: 1; min-width: 0; overflow-y: auto; }
#entry { max-width: 680px; padding: 30px 48px 60px; }
.edate {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.promptbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.promptbox .sp { color: var(--accent); font-size: 14px; line-height: 1.6; }
.promptbox p { font-size: 15.5px; line-height: 1.5; color: var(--faint); color: rgba(31,41,55,0.6); }
.ebody {
  font-family: Georgia, 'Iowan Old Style', serif;
  font-size: 19px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.surface { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 18px; }
.surface h2 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 3px;
}
.surface .why { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.excerpt {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 8px;
  cursor: pointer;
}
.excerpt .d {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
}
.excerpt .t {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.back { display: inline-block; margin: 14px 0 0 22px; }

/* ---- narrow: list and page swap ---- */
@media (max-width: 820px) {
  .list { width: 100%; border-right: none; }
  .pane { display: none; }
  .room.reading .list { display: none; }
  .room.reading .pane { display: block; }
  #entry { padding: 16px 22px 48px; }
}
