@property --notes-sidebar-reveal {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

#window2 {
  --notes-list-width: var(--os-notes-sidebar-width, 360px);
  --notes-group-height: 40px;
}

#window2 > .os-window-frame {
  --notes-sidebar-reveal: 1;
  --notes-pane-width: var(--notes-list-width);
  --notes-split-width: calc(var(--notes-pane-width) * var(--notes-sidebar-reveal));
  --notes-slide: calc((var(--notes-sidebar-reveal) - 1) * 100%);
}
#window2[data-notes-sidebar="closed"] > .os-window-frame { --notes-sidebar-reveal: 0; }
#window2[data-notes-compact="true"] > .os-window-frame {
  --notes-pane-width: 100%;
  --notes-split-width: 0px;
}
@media (prefers-reduced-motion: no-preference) {
  #window2[data-notes-animate] { --notes-motion-duration: 260ms; }
  #window2[data-notes-animate] > .os-window-frame {
    transition: --notes-sidebar-reveal var(--notes-motion-duration) cubic-bezier(.32, .08, .24, 1);
  }
  #window2[data-notes-animate] .notes-list {
    /* Keep the list painted through the slide before hidden removes it. */
    transition: display var(--notes-motion-duration) allow-discrete;
  }
}

/* The sidebar surface and its toolbar use the same offset as the reader edge. */
#window2 .os-window-bar { isolation: isolate; }
#window2 .os-window-bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto -1px 0;
  width: var(--notes-pane-width);
  border-right: 1px solid var(--os-window-rule);
  background: var(--os-surface-raised);
  transform: translateX(var(--notes-slide));
  pointer-events: none;
}

#window2 .notes-header {
  position: relative;
  container-type: inline-size;
  display: flex;
  align-items: center;
  width: min(var(--notes-list-width), calc(100% - 100px));
  height: 100%;
  padding-inline: calc(34px + var(--os-control-size) * 3 + var(--os-control-gap) * 2) 9px;
}
#window2 .notes-heading {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 0;
  margin-inline: 16px 8px;
  overflow: hidden;
  font: 600 12.5px/14px var(--os-font);
  white-space: nowrap;
}
#window2 .notes-heading strong { font-weight: 720; }
#window2 .notes-heading span { color: var(--os-muted); font-size: 11px; font-weight: 500; }
#window2 .notes-header-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--os-control-stroke);
  border-radius: 999px;
  --os-control-rest: var(--os-control-fill);
  box-shadow: var(--os-glass-rim);
}
@container (max-width: 126px) {
  #window2 .notes-heading { display: none; }
}
#window2 .notes-toggle-icon {
  position: relative;
  width: 19px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 3px;
}
#window2 .notes-toggle-icon::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-right: 1px solid currentColor;
  background: currentColor;
  opacity: .6;
}
#window2 .notes-toggle[aria-expanded="false"] .notes-toggle-icon::before { background: transparent; }
#article-browser {
  position: absolute;
  inset: var(--os-chrome-height) 0 0;
  display: grid;
  grid-template: minmax(0, 1fr) / var(--notes-split-width) minmax(0, 1fr);
  overflow: clip;
}
#window2 .notes-reading-pane { grid-area: 1 / 2; min-width: 0; min-height: 0; }
#window2 #article-panel {
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#window2 .notes-list {
  grid-area: 1 / 1;
  width: var(--notes-pane-width);
  min-height: 0;
  min-width: 0;
  padding: 0 11px 14px 10px;
  border-right: 1px solid var(--os-window-rule);
  color: var(--os-text);
  background: var(--os-window-content);
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--os-subtle) var(--os-surface-raised);
  overflow-anchor: none;
  scroll-padding-top: calc(var(--notes-group-height) + 5px);
  transform: translateX(var(--notes-slide));
}
#window2 .notes-list::-webkit-scrollbar { display: block; width: 8px; }
#window2 .notes-list::-webkit-scrollbar-track { background: var(--os-surface-raised); }
#window2 .notes-list::-webkit-scrollbar-thumb { border: 1px solid var(--os-surface-raised); border-radius: 6px; background: var(--os-subtle); }
#window2 .notes-group + .notes-group { margin-top: 22px; }
#window2 :is(.notes-group-title, .notes-current-date) {
  display: flex;
  align-items: center;
  height: var(--notes-group-height);
  margin: 0;
  padding: 0 5px 4px;
  color: var(--os-text);
  font: 750 15px/18px var(--os-font);
}
#window2 .notes-current-date {
  position: sticky;
  z-index: 1;
  top: 0;
  margin-bottom: calc(-1 * var(--notes-group-height));
  background: var(--os-surface-raised);
  box-shadow: -10px 0 var(--os-surface-raised), 11px 0 var(--os-surface-raised);
  pointer-events: none;
}

#window2 .notes-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 5px 6px 5px 18px;
  border-radius: var(--os-inner-radius);
  text-decoration: none;
}
#window2 .notes-row + .notes-row::after {
  content: "";
  position: absolute;
  inset: 0 4px auto 18px;
  height: 1px;
  background: var(--os-window-rule);
  pointer-events: none;
}
#window2 .notes-row:not(.w--current):hover { background: var(--os-hover); }
#window2 :is(.notes-row.w--current, .notes-row.w--current + .notes-row)::after { display: none; }
#window2 .notes-row-title,
#window2 .notes-row-preview {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#window2 .notes-row-title { font: 700 13px/17px var(--os-font); }
#window2 .notes-row-detail {
  display: flex;
  gap: 7px;
  min-width: 0;
  color: var(--os-list-meta);
  font: 450 12px/15px var(--os-font);
}
#window2 .notes-row-detail time { flex: none; color: var(--os-list-title); font-variant-numeric: tabular-nums; }
#window2 .notes-thumbnail {
  display: block;
  width: 42px;
  height: 42px;
  border: 1px solid var(--os-control-stroke);
  border-radius: 4px;
  background: var(--os-field);
  object-fit: cover;
}

#window2:is([data-notes-sidebar="closed"], [data-notes-compact="true"]) .os-sidebar-divider { display: none; }
#window2[data-notes-compact="true"] .os-window-bar::before { border-right: 0; }
#window2[data-notes-compact="true"] .notes-list {
  z-index: 2;
  grid-column: 1 / -1;
  border-right: 0;
}
@media (min-width: 768px) {
  #window2 .os-sidebar-divider {
    top: var(--os-chrome-height);
    left: calc(var(--notes-split-width) - 4px);
  }
}
@media (max-width: 767px) {
  #window2:not([data-notes-sidebar]) > .os-window-frame { --notes-sidebar-reveal: 0; }
  #window2:not([data-notes-sidebar]) .notes-list { display: none; }
}
