/* Reader Notes • scoped interface, independent of Argon's existing features */
.argon-note-trigger,
.argon-note-standalone button {
    appearance:none; border:1px solid var(--color-border-on-foreground-deeper,#dde2ef);
    background:var(--color-foreground,#fff);color:var(--color-text,#525f7f);
    border-radius:8px;padding:6px 12px;cursor:pointer;font:600 13px/1.55 inherit;
    min-height:33px;transition:transform .18s ease,border-color .18s ease;
}
.argon-note-trigger:hover {transform:translateY(-1px);border-color:var(--themecolor,#5e72e4)}
.argon-note-standalone {display:flex;justify-content:center;padding:12px}
.argon-notes-selection {
    position:fixed;z-index:10080;display:flex;gap:5px;padding:5px;background:#20283c;
    color:#fff;box-shadow:0 12px 28px #0004;border-radius:9px;
}
.argon-notes-selection[hidden] {display:none}
.argon-notes-selection button {border:0;border-radius:6px;background:transparent;color:inherit;padding:7px 11px;cursor:pointer;font-size:13px}
.argon-notes-selection button:hover {background:#ffffff26}
.argon-notes-panel {
    --an-border:var(--color-border-on-foreground-deeper,#e3e6ee);
    position:fixed;z-index:10070;right:18px;bottom:16px;
    width:min(800px,calc(100vw - 32px));height:min(690px,calc(100dvh - 32px));
    display:flex;flex-direction:column;overflow:hidden;border-radius:16px;
    background:var(--color-foreground,#fff);color:var(--color-text,#3c445a);
    box-shadow:0 16px 70px rgba(10,20,40,.28);border:1px solid var(--an-border);
    font:14px/1.55 var(--font,Inter,system-ui,sans-serif)
}
.argon-notes-panel[hidden] {display:none}
.argon-notes-panel button,.argon-notes-panel input,.argon-notes-panel select {font:inherit;color:inherit}
.argon-notes-panel button {cursor:pointer;appearance:none;background:transparent;border:1px solid var(--an-border);border-radius:7px;padding:6px 10px}
.argon-notes-panel button:hover {border-color:var(--themecolor,#5e72e4)}
.argon-notes-panel button:focus-visible,.argon-note-trigger:focus-visible,.argon-notes-selection button:focus-visible {
    outline:2px solid var(--themecolor,#5e72e4);outline-offset:2px
}
.argon-notes-header {display:flex;align-items:center;gap:12px;justify-content:space-between;padding:14px 16px;background:var(--color-widgets-disabled,#f4f5f9);border-bottom:1px solid var(--an-border)}
.argon-notes-header strong {font-size:18px;white-space:nowrap}
.argon-notes-header [data-note-status] {font-size:12px;opacity:.8;flex:1;text-align:right}
.argon-notes-actions {display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:9px 14px;border-bottom:1px solid var(--an-border)}
.argon-notes-actions [data-note-account] {font-size:11px;opacity:.75;margin-left:auto}
.argon-notes-layout {display:grid;grid-template-columns:minmax(180px,35%) minmax(0,1fr);min-height:0;flex:1}
.argon-notes-list-column {display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid var(--an-border)}
.argon-notes-filter {padding:10px;display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid var(--an-border)}
.argon-notes-filter select,.argon-notes-filter input {min-width:0;border:1px solid var(--an-border);padding:7px 9px;border-radius:7px;background:transparent}
.argon-notes-filter input {width:100%}
.argon-notes-items {overflow:auto;padding:8px;min-height:0;flex:1}
.argon-notes-entry {width:100%;text-align:left;display:flex;flex-direction:column;gap:4px;white-space:normal;margin-bottom:7px}
.argon-notes-entry strong {font-size:13px}
.argon-notes-entry span {font-size:12px;opacity:.85;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow-wrap:anywhere}
.argon-notes-entry.is-current {border-color:var(--themecolor,#5e72e4);background:var(--color-widgets-disabled,#f6f7fb)}
.argon-notes-editor-column {min-width:0;min-height:0;display:flex;flex-direction:column;padding:12px;gap:7px}
.argon-notes-editor-title {font-weight:700;font-size:14px;line-height:1.4;max-height:3.2em;overflow:hidden;overflow-wrap:anywhere}
.argon-notes-colors {display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:12px}
.argon-notes-colors[hidden] {display:none}
.argon-notes-colors button.argon-note-swatch {padding:2px 8px;font-size:19px;border-radius:50%;color:#323945;border:2px solid transparent}
.argon-notes-colors button[aria-pressed=true] {border-color:var(--themecolor,#5e72e4)}
.argon-note-yellow {background:#ffe695!important}.argon-note-green {background:#b9f1c2!important}.argon-note-blue {background:#c6e8ff!important}.argon-note-pink {background:#ffcddd!important}
.argon-notes-richbar {display:flex;flex-wrap:wrap;gap:4px;padding:6px;background:var(--color-widgets-disabled,#f4f5f8);border-radius:8px;max-height:115px;overflow:auto}
.argon-notes-richbar button {font-size:12px;padding:4px 8px;min-height:26px;background:var(--color-foreground,#fff)}
.argon-notes-editable {flex:1;overflow:auto;padding:13px;border:1px solid var(--an-border);border-radius:8px;min-height:80px;outline:none;overflow-wrap:anywhere;line-height:1.65;background:var(--color-foreground,#fff)}
.argon-notes-editable:focus {border-color:var(--themecolor,#5e72e4)}
.argon-notes-editable:empty:before {content:attr(data-placeholder);opacity:.5;pointer-events:none}
.argon-notes-editable h2,.argon-notes-editable h3 {margin:8px 0;font-weight:700;line-height:1.3}
.argon-notes-editable h2 {font-size:1.4em}.argon-notes-editable h3 {font-size:1.2em}
.argon-notes-editable blockquote {border-left:3px solid var(--themecolor,#5e72e4);padding-left:12px;margin:8px 0}
.argon-notes-editable ul,.argon-notes-editable ol {padding-left:25px}
.argon-notes-edit-actions {display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.argon-notes-edit-actions [data-note-delete] {margin-right:auto}
.argon-notes-edit-actions [data-note-save] {background:var(--themecolor,#5e72e4);color:#fff;border-color:transparent}
.argon-notes-panel footer {font-size:11px;line-height:1.5;opacity:.77;border-top:1px solid var(--an-border);padding:8px 12px}
/* CSS Highlight API avoids modifying the theme's article DOM (including links and PJAX handlers). */
::highlight(argon-notes-yellow){background:#ffe695;color:inherit}
::highlight(argon-notes-green){background:#b9f1c2;color:inherit}
::highlight(argon-notes-blue){background:#c6e8ff;color:inherit}
::highlight(argon-notes-pink){background:#ffcddd;color:inherit}
#primary article .post-content mark.argon-note-highlight {color:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}
@media(max-width:650px){
    .argon-notes-panel {inset:auto 0 0;width:100%;height:min(94dvh,900px);border-radius:16px 16px 0 0}
    .argon-notes-header {padding:10px 12px}
    .argon-notes-layout {grid-template-columns:1fr;grid-template-rows:minmax(115px,36%) minmax(200px,1fr)}
    .argon-notes-list-column {border-right:0;border-bottom:1px solid var(--an-border)}
    .argon-notes-filter {padding:6px 10px}
    .argon-notes-filter input {width:auto;flex:1}
    .argon-notes-editor-column {padding:9px}
    .argon-notes-richbar {max-height:73px}
    .argon-notes-panel footer {display:none}
}
@media (prefers-reduced-motion:reduce){.argon-note-trigger {transition:none}}
