:root {
  color-scheme: dark;
  --paper: #11130f;
  --ink: #f1eee4;
  --muted: #a8ad9e;
  --line: rgba(231, 225, 204, .18);
  --accent: #8ad7ab;
  font-family: "Nyarindo Sans", system-ui, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f7f3e8;
  --ink: #20251d;
  --muted: #66705f;
  --line: rgba(32, 37, 29, .16);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
}
header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}
header a { color: var(--accent); text-decoration: none; }
header strong { font: 400 20px/1 "Nyarindo Serif", Georgia, serif; }
main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 760px);
  gap: clamp(28px, 7vw, 100px);
  justify-content: center;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 70px) 24px;
}
aside { border-right: 1px solid var(--line); padding-right: 28px; }
aside label, .eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font: 10px/1.4 ui-monospace, monospace;
  letter-spacing: .12em;
}
.import-button {
  display: block;
  margin: 0 0 20px !important;
  padding: 11px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent) !important;
  text-align: center;
  cursor: pointer;
}
input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: transparent;
}
#documentList { display: grid; gap: 6px; margin-top: 18px; }
#documentList button {
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
#documentList button:hover, #documentList button.is-active {
  border-color: var(--line);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
article { min-width: 0; }
.reader-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.reader-actions span { color: var(--muted); font: 10px/1 ui-monospace, monospace; }
.reader-actions button {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.reader-actions button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
h1 { margin: 0 0 30px; font: 400 clamp(38px, 6vw, 72px)/.96 "Nyarindo Serif", Georgia, serif; }
#readerContent { font: 18px/1.85 "Nyarindo Serif", Georgia, serif; }
#readerContent p { margin: 0 0 1.2em; }
#readerContent h1,#readerContent h2,#readerContent h3 { font-family: "Nyarindo Serif", Georgia, serif; line-height: 1.1; }
#readerContent blockquote { margin: 1.4em 0; padding-left: 18px; border-left: 2px solid var(--accent); color: var(--muted); }
#readerContent pre { overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 9px; white-space: pre-wrap; }
#readerContent code { font-family: ui-monospace, monospace; font-size: .86em; }
#readerContent a { color: var(--accent); }
.empty { color: var(--muted); }
#readerStatus { position: fixed; right: 20px; bottom: 20px; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--paper); }
@media (max-width: 760px) {
  main { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 24px; }
}
