@charset "UTF-8";
:root {
  --ink: #222b27;
  --muted: #81877f;
  --green: #224c3f;
  --green-soft: #e5ede6;
  --paper: #fbfaf7;
  --line: #e8e9e2;
  --sidebar: #f0f2eb;
  --danger: #9c3e32;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #9ab7a8;
  outline-offset: 2px;
}
a {
  color: inherit;
}
img {
  display: block;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
  line-height: 1.6;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 650;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand > span {
  font-family: var(--serif);
  font-size: 33px;
  letter-spacing: -1.8px;
  line-height: 1;
}
.brand-period {
  color: var(--green);
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--green);
  color: #fff;
  padding: 13px 20px;
  border-radius: 7px;
  font-weight: 550;
  transition: background 0.12s;
}
.primary:hover {
  background: #163b30;
}
.secondary {
  background: #f1f3ed;
  border: 1px solid var(--line);
  padding: 10px 15px;
  border-radius: 6px;
}
.danger {
  color: var(--danger);
  border-color: #e4c8c3;
}
.wide {
  width: 100%;
}
.icon {
  width: 33px;
  height: 33px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  font-size: 20px;
  color: #737d73;
  flex-shrink: 0;
}
.icon:hover {
  background: #e9eee7;
  color: var(--green);
}
.icon.selected {
  color: var(--green);
  background: var(--green-soft);
}
.small {
  width: 25px;
  height: 25px;
  font-size: 18px;
}
kbd {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  padding: 2px 4px;
  border-radius: 3px;
  color: #98a099;
  white-space: nowrap;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin: 18px 0 0;
}
label input,
label select,
label textarea {
  display: block;
  width: 100%;
  padding: 12px 13px;
  margin-top: 8px;
  border: 1px solid #d9dfd5;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}
label textarea {
  min-height: 120px;
  resize: vertical;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.6;
  min-height: 0;
}
.form-error:not(:empty) {
  padding: 10px 12px;
  background: #fbefec;
  border-radius: 6px;
}
.field-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.boot {
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-story {
  background: var(--sidebar);
  padding: 50px 60px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.story-copy {
  margin: auto 0;
  max-width: 400px;
  padding: 60px 0;
}
.story-copy .eyebrow {
  color: #647c6b;
}
.story-copy h1 {
  font: normal clamp(42px, 5vw, 68px)/1.05 var(--serif);
  letter-spacing: -2.5px;
  margin: 24px 0;
}
.story-copy > p:not(.eyebrow) {
  color: #768076;
  font-size: 15px;
  line-height: 1.85;
  max-width: 320px;
}
.story-rule {
  width: 48px;
  height: 1px;
  background: #93a78e;
  margin: 35px 0;
}
.story-copy .story-foot {
  font-size: 12px !important;
}
.story-index {
  font-size: 9px;
  color: #8b958a;
  letter-spacing: 2px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
}
.auth-card {
  max-width: 340px;
  width: 100%;
}
.auth-card h2 {
  font: normal 35px var(--serif);
  letter-spacing: -0.8px;
  margin: 16px 0 10px;
}
.auth-card .primary {
  margin-top: 25px;
  justify-content: space-between;
}
.auth-footer {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 23px;
}
.notice {
  padding: 15px;
  background: #f1f3ed;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 7px;
  margin-top: 20px;
}
.workspace {
  display: grid;
  grid-template-columns: 232px 308px minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid #e0e5db;
  padding: 30px 18px 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}
.sidebar .brand > span {
  font-size: 31px;
}
.new-note {
  margin: 30px 0 24px;
  padding: 11px 12px;
  justify-content: flex-start;
  font-size: 12px;
  box-shadow: 0 3px 6px #224c3f13;
}
.new-note > span {
  font-size: 20px;
  font-weight: 300;
}
.new-note kbd {
  margin-left: auto;
  color: #bdd0c3;
  border: 1px solid #6f92804d;
}
.sidebar nav {
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  gap: 11px;
  border-radius: 5px;
  font-size: 12px;
  text-align: left;
  margin-bottom: 2px;
}
.nav-item:hover {
  background: #e9ede3;
}
.nav-item.active {
  background: #e0e8dc;
  color: var(--green);
  font-weight: 600;
}
.nav-symbol {
  font-size: 17px;
  width: 18px;
  line-height: 1;
  text-align: center;
  font-weight: 400;
  color: #819080;
}
.count {
  margin-left: auto;
  font-size: 10px;
  color: #929c8b;
  min-width: 18px;
  text-align: center;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 9px 12px;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #92998a;
}
.folder-tree .nav-item {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
.folder-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.folder-tree .nav-symbol {
  font-size: 16px;
}
.nav-bottom {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #dfe4d9;
}
.sidebar-footer {
  border-top: 1px solid #dfe4d9;
  margin-top: 18px;
  padding: 18px 0 20px;
}
.account-chip {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 10px;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #dde6d7;
  border-radius: 50%;
  color: #5c765d;
  font: 18px var(--serif);
}
.account-chip strong {
  display: block;
  font-size: 11px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-chip small {
  display: block;
  font-size: 9px;
  color: #959d8f;
  margin-top: 5px;
}
.account-dots {
  margin-left: auto;
  color: #97a18d;
  letter-spacing: 1px;
}
.footer-links {
  display: flex;
  justify-content: space-between;
  margin: 17px 4px 0;
  color: #858e7d;
  font-size: 10px;
}
.footer-links button:hover {
  color: var(--green);
}
.note-list-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  min-height: 0;
  background: #fdfcf9;
}
.list-heading {
  padding: 35px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.list-heading .eyebrow {
  font-size: 8px;
  margin: 0 0 12px;
}
.list-heading h2 {
  font: normal 27px var(--serif);
  letter-spacing: -0.6px;
  margin: 0;
  overflow-wrap: anywhere;
}
.search-box {
  margin: 0 20px 22px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #f4f5ef;
  border-radius: 5px;
  padding: 8px 10px;
  gap: 7px;
}
.search-box > span {
  font-size: 22px;
  color: #91998c;
}
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 11px;
  padding: 3px;
  color: var(--ink);
}
.search-box input:focus {
  outline: none;
}
.search-box input::placeholder {
  color: #9da397;
}
.search-box kbd {
  font-size: 8px;
  border: 1px solid #e0e4d9;
}
.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px 12px;
  font-size: 9px;
  color: #989e93;
  border-bottom: 1px solid var(--line);
}
.list-meta > span:last-child {
  font-size: 8px;
  letter-spacing: 0.8px;
}
.note-list {
  flex: 1;
  overflow: auto;
  padding: 10px;
}
.note-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 19px 14px;
  border-radius: 6px;
  position: relative;
  border: 1px solid transparent;
  margin-bottom: 3px;
  transition: background 0.12s;
}
.note-card:after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 14px;
  right: 14px;
  border-bottom: 1px solid #eeeee8;
}
.note-card:hover {
  background: #f1f3ec;
}
.note-card.active {
  background: #edf1e8;
  border-color: #dee5d8;
}
.note-card.active:after {
  display: none;
}
.note-card h3 {
  font-size: 12px;
  margin: 0 0 9px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-card h3 .star {
  font-size: 13px;
  color: #7b946c;
  margin-right: 5px;
}
.note-card p {
  font-size: 10px;
  line-height: 1.65;
  color: #92988c;
  margin: 0 0 11px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.note-card small {
  font-size: 8px;
  color: #a2a89b;
  display: block;
}
.note-card small > span {
  float: right;
}
.list-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.list-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: #a0a596;
  font: italic 11px var(--serif);
}
.editor-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.empty-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.empty-editor img {
  opacity: 0.65;
  margin-bottom: 23px;
}
.empty-editor h2 {
  font: normal 34px var(--serif);
  letter-spacing: -0.7px;
  margin: 9px 0;
}
.empty-editor p:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
}
.empty-editor .primary {
  margin-top: 18px;
  font-size: 12px;
}
.note-editor {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.editor-toolbar {
  height: 70px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  gap: 10px;
}
.breadcrumb {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #989f93;
  font-size: 10px;
  min-width: 0;
}
.breadcrumb > span:first-of-type {
  max-width: 180px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.breadcrumb-slash {
  color: #c5c9be;
}
.toolbar-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.save-status {
  color: #85977d;
  font-size: 9px;
  margin-right: 7px;
  white-space: nowrap;
}
.save-status::before {
  content: "●";
  font-size: 6px;
  color: #94b27e;
  margin-right: 6px;
}
.save-status.error {
  color: var(--danger);
}
.save-status.error::before {
  color: var(--danger);
}
.writing-surface {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 48px clamp(25px, 5vw, 85px) 24px;
  display: flex;
  flex-direction: column;
}
.note-title {
  border: 0;
  background: none;
  font: normal clamp(29px, 3.2vw, 43px) var(--serif);
  letter-spacing: -1.2px;
  width: 100%;
  padding: 0;
  line-height: 1.2;
  color: var(--ink);
}
.note-title:focus {
  outline: none;
}
.note-title::placeholder {
  color: #c1c5b9;
}
.note-byline {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 9px;
  color: #a1a697;
  margin: 18px 0 30px;
}
.tiny-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c4c9bb;
}
.editor-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 18px;
  margin-bottom: 23px;
  min-height: 32px;
}
.editor-tabs button {
  font-size: 10px;
  padding: 0 0 12px;
  color: #a2a894;
  border-bottom: 2px solid transparent;
}
.editor-tabs button.active {
  color: var(--green);
  border-color: #496f52;
  font-weight: 600;
}
.editor-tabs > span {
  margin-left: auto;
  letter-spacing: 1px;
  font-size: 7px;
  color: #b0b6a5;
  padding-bottom: 12px;
}
.note-body {
  flex: 1;
  min-height: 280px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #4f5b4f;
  resize: none;
  font:
    13px/1.95 "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  padding: 0 0 35px;
  tab-size: 2;
}
.note-body:focus {
  outline: none;
}
.note-body::placeholder {
  font: italic 17px var(--serif);
  color: #b1b8a6;
}
.note-preview {
  font: 16px/1.9 var(--serif);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #53604f;
  min-height: 280px;
  padding-bottom: 35px;
}
.note-preview h1,
.note-preview h2,
.note-preview h3 {
  line-height: 1.3;
  font-weight: 400;
  margin: 16px 0;
}
.note-preview h1 {
  font-size: 30px;
}
.note-preview h2 {
  font-size: 24px;
}
.note-preview h3 {
  font-size: 20px;
}
.note-preview code {
  font: 12px/1.8 monospace;
  background: #edf0e7;
  padding: 2px 5px;
}
.note-preview blockquote {
  border-left: 2px solid #adc09d;
  padding-left: 16px;
  color: #87957e;
  margin: 10px 0;
}
.editor-footer {
  height: 46px;
  min-height: 46px;
  border-top: 1px solid var(--line);
  padding: 0 30px;
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 9px;
  color: #9ba28f;
}
.editor-footer button {
  margin-left: auto;
  color: #859878;
  font-size: 9px;
}
.trash-banner {
  padding: 12px 30px;
  font-size: 11px;
  background: #f3e9dc;
  color: #877450;
  display: flex;
  justify-content: space-between;
}
.trash-banner button {
  font-weight: 600;
  text-decoration: underline;
}
.mobile-only {
  display: none;
}
dialog {
  width: min(540px, calc(100% - 30px));
  max-height: 85dvh;
  padding: 25px;
  border: 1px solid #dde3d5;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px #24352824;
}
dialog::backdrop {
  background: #202d2566;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dialog-heading h2 {
  font: normal 28px var(--serif);
  letter-spacing: -0.5px;
  margin: 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.dialog-actions button {
  font-size: 12px;
}
.dialog-copy {
  font-size: 12px;
  line-height: 1.8;
  color: #84907d;
}
.dialog-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 20px;
}
.dialog-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dialog-row > div {
  min-width: 0;
  flex: 1;
}
.dialog-row strong {
  font-size: 11px;
  display: block;
  overflow-wrap: anywhere;
}
.dialog-row small {
  font-size: 9px;
  line-height: 1.7;
  color: #919b88;
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.dialog-row button {
  font-size: 10px;
  flex-shrink: 0;
  color: var(--green);
}
.dialog-tabs {
  display: flex;
  gap: 6px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.dialog-tabs button {
  font-size: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.dialog-tabs button.active {
  background: var(--green-soft);
  color: var(--green);
}
.revision-body {
  font: 12px/1.7 monospace;
  white-space: pre-wrap;
  background: #f0f3e9;
  padding: 15px;
  border-radius: 6px;
  max-height: 260px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #243d2e;
  color: #fff;
  padding: 12px 20px;
  border-radius: 7px;
  z-index: 20;
  font-size: 12px;
  box-shadow: 0 5px 20px #0002;
  max-width: 90vw;
  text-align: center;
}
.toast.error {
  background: #8c4537;
}
.link-output {
  font: 11px/1.7 monospace;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  overflow-wrap: anywhere;
  user-select: all;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.checkbox-label input {
  width: auto;
  margin: 0;
}
input:read-only,
textarea:read-only {
  cursor: default;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: 250px 340px minmax(0, 1fr);
  }
  .writing-surface {
    padding-top: 60px;
  }
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 200px 265px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .editor-toolbar {
    padding: 0 20px;
  }
  .toolbar-actions {
    gap: 3px;
  }
  .writing-surface {
    padding: 38px 30px 20px;
  }
  .save-status {
    font-size: 8px;
    margin-right: 0;
  }
  .editor-footer {
    padding: 0 20px;
  }
  .note-byline {
    font-size: 8px;
  }
}
@media (max-width: 820px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 235px;
    z-index: 10;
    box-shadow: 20px 0 60px #24352833;
    transform: translateX(-110%);
    transition: transform 0.12s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-only {
    display: inline-flex;
  }
  .list-heading {
    padding: 25px 18px 18px;
    gap: 8px;
    justify-content: flex-start;
  }
  .list-heading .eyebrow {
    font-size: 7px;
  }
  .list-heading h2 {
    font-size: 24px;
  }
  .list-heading #folder-settings {
    margin-left: auto;
  }
  .breadcrumb {
    gap: 8px;
  }
  .toolbar-actions .save-status {
    display: none;
  }
  .writing-surface {
    padding: 32px 24px 20px;
  }
  .editor-tabs > span {
    font-size: 6px;
  }
  .auth-story {
    padding: 35px;
  }
  .auth-panel {
    padding: 35px;
  }
  .story-copy h1 {
    font-size: 44px;
  }
}
@media (max-width: 580px) {
  .workspace {
    display: block;
  }
  .note-list-pane {
    width: 100%;
    height: 100dvh;
  }
  .editor-pane {
    display: none;
    height: 100dvh;
  }
  .workspace.editing .note-list-pane {
    display: none;
  }
  .workspace.editing .editor-pane {
    display: flex;
  }
  .list-heading {
    padding: 25px;
    gap: 14px;
  }
  .list-heading h2 {
    font-size: 30px;
  }
  .search-box {
    margin: 5px 25px 25px;
  }
  .note-card {
    padding: 20px;
  }
  .note-card h3 {
    font-size: 14px;
  }
  .note-card p {
    font-size: 12px;
  }
  .note-card small {
    font-size: 10px;
  }
  .note-title {
    font-size: 35px;
  }
  .editor-toolbar {
    height: 60px;
    min-height: 60px;
    padding: 0 12px;
  }
  .toolbar-actions {
    gap: 1px;
  }
  .note-byline {
    font-size: 8px;
    gap: 8px;
  }
  .editor-footer {
    gap: 13px;
    padding: 0 20px;
  }
  .editor-footer button {
    font-size: 8px;
  }
  .auth {
    display: block;
  }
  .auth-story {
    padding: 25px 30px;
  }
  .auth-story .brand > span {
    font-size: 30px;
  }
  .story-copy {
    padding: 35px 0 10px;
    max-width: none;
  }
  .story-copy h1 {
    font-size: 40px;
    margin: 16px 0;
  }
  .story-copy > p:not(.eyebrow) {
    font-size: 12px;
    line-height: 1.7;
  }
  .story-rule,
  .story-foot,
  .story-index {
    display: none;
  }
  .auth-panel {
    padding: 40px 30px;
  }
  .auth-card {
    max-width: none;
  }
  .auth-card h2 {
    font-size: 30px;
  }
  .dialog-row {
    flex-wrap: wrap;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.folder-tree .depth-0 {
  padding-left: 12px;
}
.folder-tree .depth-1 {
  padding-left: 25px;
}
.folder-tree .depth-2 {
  padding-left: 38px;
}
.folder-tree .depth-3 {
  padding-left: 51px;
}
.folder-tree .depth-4 {
  padding-left: 64px;
}
.folder-tree .depth-5 {
  padding-left: 77px;
}
.folder-tree .depth-6 {
  padding-left: 90px;
}
.folder-tree .depth-7 {
  padding-left: 103px;
}
.folder-tree .depth-8 {
  padding-left: 116px;
}

/* Monaco needs an explicit flexible viewport; its own scrolling holds long notes. */
.monaco-container {
  width: 100%;
  min-height: 320px;
  flex: 1;
  position: relative;
  overflow: hidden;
}
.monaco-container .monaco-editor {
  border-radius: 3px;
}
.monaco-container:not(.hidden) ~ .note-body {
  display: none;
}
#editor-mode {
  white-space: nowrap;
}
@media (max-width: 580px) {
  .monaco-container {
    min-height: 300px;
  }
}

.auth-navigation {
  text-align: center;
  margin-top: 18px;
}
.auth-link {
  border: 0;
  background: none;
  color: var(--green, #224c3f);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 6px;
  cursor: pointer;
}
.signup-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer-links {
  flex-wrap: wrap;
  gap: 8px 12px;
}
.utility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.utility-grid button {
  text-align: left;
}
.editor-footer {
  flex-wrap: wrap;
  gap: 10px;
}
.editor-tabs {
  flex-wrap: wrap;
}
.dialog-row small {
  flex-shrink: 0;
}
@media (max-width: 580px) {
  .utility-grid {
    grid-template-columns: 1fr;
  }
  .editor-footer {
    font-size: 10px;
  }
}

.check-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  font-size: 12px;
  padding: 14px;
  background: #f1f4eb;
  border-radius: 6px;
}
.check-results h3 {
  margin-top: 22px;
}
.check-result-row {
  font-family: Consolas, monospace;
  font-size: 12px;
  padding: 5px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 580px) {
  .check-stats {
    grid-template-columns: 1fr;
  }
}

.public-library-link {
  text-decoration: none;
  margin-top: 14px;
}
.library-page {
  min-height: 100vh;
  overflow: auto;
  background: #faf9f5;
}
.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 5vw;
  border-bottom: 1px solid #deded5;
}
.library-header nav {
  display: flex;
  gap: 20px;
  font-size: 12px;
}
.library-header a {
  color: #224c3f;
}
.library-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}
.library-main h1 {
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  margin: 12px 0;
}
.library-search {
  margin: 28px 0;
}
.library-search > div {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.library-search input {
  flex: 1;
  min-width: 0;
}
.public-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.public-card,
.public-detail {
  padding: 24px;
  border: 1px solid #deded5;
  background: white;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.public-card h2,
.public-detail h2 {
  font-family: Georgia, serif;
  font-size: 25px;
  margin: 0 0 14px;
  font-weight: 400;
}
.public-excerpt {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.7;
  margin: 18px 0;
}
.public-detail {
  margin: 28px 0;
}
.public-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
  font-size: 13px;
  line-height: 1.9;
  margin: 24px 0;
  max-height: 65vh;
  overflow: auto;
}
.public-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.public-controls a.primary {
  text-decoration: none;
}
@media (max-width: 600px) {
  .library-header {
    padding: 18px;
    flex-wrap: wrap;
  }
  .library-main {
    padding: 30px 18px 60px;
  }
  .public-results {
    grid-template-columns: 1fr;
  }
  .library-main h1 {
    font-size: 36px;
  }
  .public-card,
  .public-detail {
    padding: 18px;
  }
}

.import-preview { max-height:260px; overflow:auto; padding:10px 0; font-family:Consolas,monospace; font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
#dialog-body details { border-top:1px solid #deded5; padding:14px 0; }
#dialog-body summary { cursor:pointer; font-size:13px; overflow-wrap:anywhere; }
#public-kind { margin:16px 0 0 8px; padding:8px 12px; border:1px solid #deded5; background:white; border-radius:4px; font:inherit; color:inherit; }

.directory-preview { width:100%; max-width:1100px; padding:38px clamp(18px,4vw,52px); overflow:auto; height:100%; }
.directory-preview h2 { font-family:Georgia,serif; font-weight:400; font-size:32px; margin:12px 0; }
.directory-preview-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:16px; margin:22px 0; }
.directory-file-card { border:1px solid #deded5; border-radius:7px; padding:18px; background:#fff; overflow-wrap:anywhere; }
.directory-file-card h3 { font-family:Georgia,serif; font-size:20px; margin:12px 0; font-weight:400; }
.file-kind { display:inline-block; text-transform:uppercase; letter-spacing:.1em; color:#224c3f; font-size:10px; margin-bottom:8px; }
.directory-file-path { color:#6c736e; font-family:Consolas,monospace; font-size:11px; }
.directory-file-excerpt { white-space:pre-wrap; font-size:12px; line-height:1.7; color:#57635c; }
.directory-search-card { border-left:3px solid #224c3f; }
@media(max-width:580px) { .directory-preview { padding:24px 18px; } .directory-preview-grid { grid-template-columns:1fr; } }

.subscription-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 26px;min-height:45px;flex-shrink:0;background:#e5ecd9;border-bottom:1px solid #cfdcc5;color:#4c6341;font-size:11px}.subscription-banner button{color:#245035;font-weight:600;white-space:nowrap}.editor-pane>.note-editor{height:auto;flex:1;min-height:0}.editor-pane>.directory-preview{height:auto;flex:1;min-height:0}.public-results[aria-busy=true]{opacity:.55}mark{background:#e4ebae;color:inherit;border-radius:2px}@media(max-width:580px){.subscription-banner{padding:10px 14px;font-size:9px}}
