@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&display=swap");
:root {
  --ink: #282b2c;
  --muted: #828786;
  --paper: #fff;
  --canvas: #f6f5f2;
  --line: #e9e8e4;
  --green: #376b59;
  --green-dark: #285242;
  --amber: #c27a35;
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
}
.topbar {
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 4.1%;
  gap: 38px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font: 600 19px var(--serif);
  text-decoration: none;
}
.brand-mark {
  height: 31px;
  width: 31px;
  border-radius: 10px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  font: italic 24px var(--serif);
}
.brand-dot {
  color: #b77a4d;
}
.doc-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}
.eyebrow {
  font: 500 9px var(--mono);
  letter-spacing: 0.1em;
  color: #929690;
  margin: 0 0 7px;
}
.doc-meta .eyebrow {
  margin: 0;
}
.doc-meta strong {
  font-size: 12px;
  font-weight: 600;
}
.save-state {
  color: #789082;
  font-size: 10px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}
.button,
.icon-button {
  font: 600 11px var(--sans);
  border-radius: 7px;
  padding: 10px 13px;
  cursor: pointer;
  transition: 0.15s;
}
.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}
.secondary {
  background: white;
  border: 1px solid #e5e5e0;
  color: #4b514e;
}
.primary {
  background: var(--green);
  border: 1px solid var(--green);
  color: white;
}
.primary:hover {
  background: var(--green-dark);
}
.accent {
  background: #f4e8dc;
  border: 1px solid #eddcc9;
  color: #80522d;
}
.icon-button {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  font-size: 16px;
  padding: 5px 10px;
  color: #66736c;
}
.app-shell {
  width: min(1360px, 92%);
  margin: 47px auto 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
}
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 24px;
  padding: 0 2px;
}
.page-heading .eyebrow {
  margin-bottom: 9px;
}
.page-heading h1 {
  font: 400 35px/1.05 var(--serif);
  letter-spacing: -0.025em;
  margin: 0;
}
.page-heading h1 em {
  font-style: italic;
  color: var(--green);
}
.subhead {
  color: #7f8581;
  font-size: 12px;
  margin: 9px 0 0;
}
.heading-actions {
  display: flex;
  gap: 8px;
}
.document-card {
  background: #fff;
  border: 1px solid #e9e8e3;
  border-radius: 10px;
  min-height: 620px;
  box-shadow: 0 3px 14px #24251b08;
  overflow: hidden;
}
.document-toolbar {
  height: 47px;
  border-bottom: 1px solid #efeee9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
.tabs {
  height: 100%;
  display: flex;
  gap: 19px;
}
.tab {
  border: 0;
  background: none;
  font: 500 11px var(--sans);
  color: #858984;
  cursor: pointer;
  position: relative;
  padding: 0 2px;
}
.tab.active {
  color: var(--green);
  font-weight: 700;
}
.tab.active:after {
  content: "";
  height: 2px;
  background: var(--green);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
.doc-tools {
  display: flex;
  gap: 18px;
  align-items: center;
  color: #a2a59f;
  font: 10px var(--mono);
}
.text-button {
  border: 0;
  background: none;
  color: #65746b;
  cursor: pointer;
  font: 500 10px var(--sans);
  padding: 4px;
}
.reader {
  max-width: 770px;
  margin: 0 auto;
  padding: 49px 62px 75px;
  font: 16px/1.82 var(--serif);
  color: #373c39;
  white-space: normal;
  overflow-wrap: anywhere;
  
    /* max-height: 60vh; */
    overflow-y: auto;
}
.reader h1,
.reader h2,
.reader h3 {
  font-family: var(--serif);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #26382f;
}
.reader h1 {
  font-size: 34px;
  margin: 0 0 24px;
}
.reader h2 {
  font-size: 25px;
  margin: 37px 0 13px;
}
.reader h3 {
  font-size: 19px;
  margin: 28px 0 9px;
}
.reader p {
  margin: 0 0 17px;
}
.reader ul,
.reader ol {
  padding-left: 24px;
}
.reader li {
  padding-left: 3px;
  margin: 3px 0;
}
.reader blockquote {
  border-left: 3px solid #c8d5c9;
  padding: 5px 16px;
  margin: 18px 0;
  color: #66736b;
  background: #f8f9f6;
}
.reader strong {
  font-weight: 600;
  color: #2d3c34;
}
.reader code {
  font: 12px var(--mono);
  background: #f2f2ee;
  border-radius: 3px;
  padding: 2px 4px;
}
.reader a {
  color: #386e59;
}
.reader hr {
  border: 0;
  border-top: 1px solid #e9e9e3;
  margin: 30px 0;
}
.reader mark.note-highlight {
  background: #f7e6b9;
  border-bottom: 2px solid #dcab50;
  padding: 0 1px;
  cursor: pointer;
}
.editor {
  display: none;
  width: 100%;
  min-height: 570px;
  resize: vertical;
  border: 0;
  padding: 40px 7%;
  font: 13px/1.75 var(--mono);
  color: #38423d;
  outline: none;
}
.empty-state {
  display: none;
  text-align: center;
  padding: 115px 20px 90px;
}
.empty-icon {
  font-size: 30px;
  color: #6b8e7d;
}
.empty-state h2 {
  font: 24px var(--serif);
  margin: 15px 0 6px;
}
.empty-state p {
  color: #858a85;
  font-size: 12px;
  margin: 0 0 19px;
}
.selection-hint {
  color: #999d96;
  font-size: 10px;
  text-align: center;
  padding: 13px;
}
.sidebar {
  background: #fff;
  border: 1px solid #e9e8e3;
  border-radius: 10px;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side-head {
  padding: 21px 21px 14px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.side-head .eyebrow {
  margin-bottom: 6px;
}
.side-head h2 {
  font: 500 22px var(--serif);
  margin: 0;
}
.count {
  font: 10px var(--mono);
  color: #92988f;
  background: #f1f2ee;
  border-radius: 20px;
  padding: 4px 7px;
  vertical-align: middle;
}
.filter-row {
  display: flex;
  padding: 0 20px 13px;
  gap: 6px;
  border-bottom: 1px solid #efeee9;
}
.filter {
  border: 0;
  border-radius: 20px;
  padding: 6px 10px;
  background: #f5f5f2;
  color: #818781;
  font: 500 10px var(--sans);
  cursor: pointer;
}
.filter.active {
  background: #e8efe9;
  color: #426553;
}
.notes-list {
  padding: 8px 12px;
  overflow: auto;
  max-height: calc(100vh - 270px);
  flex: 1;
}
.note-card {
  padding: 13px 10px;
  border-bottom: 1px solid #f0efeb;
  cursor: pointer;
  border-radius: 5px;
}
.note-card:hover {
  background: #fafaf7;
}
.note-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.note-type {
  font: 500 9px var(--mono);
  letter-spacing: 0.03em;
  color: #778078;
  background: #f1f2ed;
  padding: 4px 6px;
  border-radius: 3px;
}
.note-date {
  color: #a5a69e;
  font: 9px var(--mono);
}
.note-quote {
  font: italic 12px/1.45 var(--serif);
  color: #6c756e;
  margin: 0 0 7px;
  border-left: 2px solid #e7cf9c;
  padding-left: 8px;
}
.note-body {
  font-size: 11px;
  line-height: 1.55;
  margin: 0;
  color: #3e4541;
}
.note-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}
.status-select {
  font: 10px var(--sans);
  border: 0;
  background: transparent;
  color: #8a8e88;
  cursor: pointer;
}
.delete-note {
  border: 0;
  background: transparent;
  color: #aaa;
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
}
.note-card:hover .delete-note {
  opacity: 1;
}
.empty-notes {
  padding: 60px 20px;
  text-align: center;
  color: #999;
  font-size: 12px;
  line-height: 1.6;
}
.empty-notes span {
  font-size: 22px;
  color: #c0c7bf;
  display: block;
  margin-bottom: 12px;
}
.sidebar-foot {
  border-top: 1px solid #efeee9;
  padding: 14px 19px;
  color: #969b94;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}
.privacy-dot {
  width: 6px;
  height: 6px;
  background: #75a185;
  border-radius: 50%;
}
.sidebar-foot .danger-text {
  margin-left: auto;
  color: #ae7770;
}
.modal {
  border: 0;
  border-radius: 12px;
  width: min(520px, calc(100% - 28px));
  padding: 0;
  box-shadow: 0 20px 80px #18211d40;
}
.modal::backdrop {
  background: #20272270;
  backdrop-filter: blur(2px);
}
.modal form {
  padding: 25px;
}
.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-head h2 {
  font: 25px var(--serif);
  margin: 0;
}
.modal-head .eyebrow {
  margin-bottom: 5px;
}
.close-button {
  border: 0;
  background: none;
  color: #8c918c;
  font-size: 23px;
  cursor: pointer;
}
.field-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #555e57;
  margin: 14px 0 7px;
}
.quote-preview {
  border-left: 3px solid #d9b775;
  background: #faf7ef;
  margin: 0;
  padding: 12px 13px;
  font: italic 14px/1.5 var(--serif);
  color: #59635d;
  max-height: 110px;
  overflow: auto;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 15px;
  font-size: 10px;
  font-weight: 700;
  color: #555e57;
}
.field select,
.note-input {
  border: 1px solid #e5e6e0;
  background: #fdfdfb;
  border-radius: 6px;
  padding: 10px;
  font: 12px var(--sans);
  color: #424b45;
  outline-color: #789887;
}
.note-input {
  width: 100%;
  resize: vertical;
  line-height: 1.55;
}
.modal-footer {
  display: flex;
  justify-content: end;
  gap: 8px;
  margin-top: 18px;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 15px);
  opacity: 0;
  background: #2f4138;
  color: white;
  padding: 11px 17px;
  border-radius: 7px;
  font-size: 11px;
  transition: 0.2s;
  pointer-events: none;
  z-index: 5;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: 94%;
    margin-top: 28px;
  }
  .sidebar {
    min-height: 300px;
  }
  .notes-list {
    max-height: 480px;
  }
  .topbar {
    padding: 0 3%;
    gap: 16px;
  }
  .page-heading {
    align-items: start;
    gap: 15px;
    flex-direction: column;
  }
  .reader {
    padding: 35px 7%;
  }
  .toolbar .secondary:nth-of-type(2) {
    display: none;
  }
}
@media (max-width: 560px) {
  .topbar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 4%;
  }
  .doc-meta {
    display: none;
  }
  .toolbar {
    gap: 5px;
  }
  .toolbar .button {
    padding: 9px;
    font-size: 10px;
  }
  .toolbar .button.secondary {
    display: none;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions button {
    flex: 1;
  }
  .document-card {
    min-height: 510px;
  }
  .reader {
    font-size: 15px;
    padding: 28px 6%;
  }
  .reader h1 {
    font-size: 29px;
  }
  .reader h2 {
    font-size: 22px;
  }
}
