/* The open Source Serif 4 subsets already used by Notes, hosted locally. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-cyrillic-ext.4d72739b0e43d64e.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-cyrillic.7683b72ed39c9fc6.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-greek.303d60869ffd404c.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384, U+0385-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-vietnamese.752875b4c33f07a3.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext.231f594ad829d45f.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin.8e38e3fbd74dea20.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@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 #article-panel .words img { height: auto; }
#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; }
}
