@import url("experience.css");
/* Notebook page. Shared SimTrade components live in experience.css; this file only
   lays out the page and styles notebook-only parts (editor, prose, trash, extras). */
.skip{position:absolute;top:-100px;left:15px;background:var(--bg-card);padding:12px;z-index:50}
.skip:focus{top:10px}
.muted{color:var(--text-muted);font-size:13px;line-height:1.6}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.gate{max-width:720px;margin:12vh auto;padding:32px}
.gate h1{font-size:clamp(26px,4vw,36px)}
.eyebrow{font-size:12px;letter-spacing:1.5px;color:var(--text-muted)}
label{display:block;font-size:12.5px;font-weight:600;color:var(--text-muted);margin:16px 0 6px}
input,textarea{width:100%;min-width:0}
textarea{resize:vertical;line-height:1.85;min-height:260px}

/* Layout: three panels on the white page, centered with a maximum width. */
body>main{display:grid;grid-template-columns:minmax(240px,280px) minmax(350px,1fr) minmax(260px,320px);grid-template-rows:minmax(0,1fr);gap:16px;
  max-width:var(--page-max);margin:16px auto;padding:0 20px;overflow:hidden}
.sidebar,.extras-sidebar,.content{min-height:0;min-width:0;overflow-y:auto}
.sidebar,.extras-sidebar{padding:16px}
.content{padding:24px clamp(18px,3vw,36px);background:var(--bg-card)}
.new-note{width:100%;margin-bottom:6px}
.side-block{padding:14px 0;border-top:1px solid var(--border)}
.side-block:first-of-type{border-top:0}
.search-row{display:flex;gap:8px}
.search-row .rp-search{flex:1;min-width:0}
.search-row button{flex-shrink:0;white-space:nowrap}
.tag-filter{justify-content:space-between;overflow-wrap:anywhere}
.tag-filter span:last-child{font-variant-numeric:tabular-nums;color:var(--text-faint);font-size:12.5px}
.tag-filter[aria-pressed="true"] span:last-child{color:var(--accent);font-weight:700}
#note-list{list-style:none;padding:0;margin:8px 0}
.date-group{padding:10px 16px 2px;font-size:11.5px;font-weight:600;color:var(--text-faint)}
.side-nav .note-item{flex-direction:column;align-items:flex-start;gap:0;padding:9px 13px;overflow-wrap:anywhere}
.note-item strong{display:block;margin-bottom:2px;font-weight:600;color:var(--text)}
.note-item small{display:block;font-size:11.5px;font-weight:400;color:var(--text-faint)}
#open-trash,#more{width:100%;margin-bottom:6px}

/* The Markdown source is kept for the editor and tests; it is not a user-facing control. */
#source-toggle:not([open]){display:none}
#trash-panel .note-toolbar{margin-bottom:8px}
#trash-panel .gc-title{flex:1;margin:0;border:0;padding:0;font-size:18px}
.trash-card{display:grid;gap:6px;padding:16px 0;border-bottom:1px solid var(--border)}
.trash-card strong{font-size:15px;overflow-wrap:anywhere}
.trash-card .preview{color:var(--text-muted);line-height:1.7;overflow-wrap:anywhere;max-height:7.5em;overflow:hidden;margin:0}
.trash-card button{justify-self:start}
.prose blockquote{border-left:3px solid var(--border-strong);margin-left:0;padding-left:18px;color:var(--text-muted)}
.prose code{background:var(--bg-surface);border-radius:3px;padding:2px 4px;font-family:var(--mono)}
.prose mark{background:var(--gold-bg);color:inherit}
.empty{margin:12vh auto;max-width:520px}
.empty .ic{color:var(--text-faint)}
.empty h2{font-size:18px;color:var(--text);font-weight:700;margin:12px 0 4px}
.note-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}
.share-wrap{display:flex;align-items:center;gap:10px;justify-content:flex-end;min-width:0}
.share-wrap .hint{margin:0;max-width:22em;text-align:right}
#title{font-size:20px;font-weight:700}
#note-status{min-height:22px;color:var(--text-muted);font-size:13px}
.save-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0 4px;margin-top:20px;border-top:1px solid var(--border)}
.save-row button{flex-shrink:0;white-space:nowrap;min-width:160px}
.new-badge p{margin-top:0}
#read-title{font-size:24px;line-height:1.4;overflow-wrap:anywhere}
.tag{margin:0 0 12px}
.tag:empty{display:none}
.prose{line-height:1.85;overflow-wrap:anywhere;font-size:15px}
.prose p{white-space:pre-wrap}
.prose pre{white-space:pre-wrap;border-radius:var(--radius-sm);background:var(--bg-surface);padding:16px;font-family:var(--mono)}
/* Pictures stay small enough to read around them (teacher feedback #4). */
.prose img{display:block;max-width:min(100%,520px);height:auto;max-height:320px;object-fit:contain;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--panel);cursor:default}
#attachments-section{margin-top:24px}
#attachments-section summary{min-height:44px}
#attachment-count{color:var(--text-faint)}
#attachments-section>:not(summary){margin-left:18px}

.note-block{border-radius:var(--radius-sm);margin:10px 0;padding:4px 8px;cursor:text;min-height:32px}
.note-block:hover{background:var(--panel)}
.note-block > :first-child{margin-top:0}
.note-block > :last-child{margin-bottom:0}
.note-block.editing{padding:4px 8px}
textarea.block-editor{display:block;padding:0;border:0;border-radius:0;min-height:32px;resize:none;overflow:hidden;font:inherit;line-height:inherit;background:transparent}
textarea.block-editor:focus{outline-offset:5px}
#append-block{margin-top:12px;border-color:transparent;background:transparent}
#block-help{margin-top:20px}

.extras-sidebar .gc-title{margin-top:18px}
.extras-sidebar .gc-title:first-of-type{margin-top:0}
.annotation-card{padding:12px 0;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.annotation-card p{white-space:pre-wrap}
.annotation-card button{margin:4px 6px 4px 0;font-size:12.5px}
.annotation-card > button:first-child{text-align:left;justify-content:flex-start;width:100%}
#comment-body{min-height:100px}
#comment-form button{margin:8px 8px 0 0}
.attachment-card{font-size:13px;overflow-wrap:anywhere}
.upload-row{margin:12px 0 0}
.upload-row input{max-width:100%;font-size:13px}
.note-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.focused-block{outline:2px solid var(--gold)}
.mobile-toolbar,button.mobile-only{display:none}
/* JS rewrites this heading's text, so it carries the .lg look itself. */
.list-heading{font-size:14.5px;font-weight:700;color:var(--text)}

/* Selection menu uses the SimTrade floating menu (.ctx-menu); JS positions it. */
#selection-tools{display:flex;flex-direction:column;max-width:calc(100vw - 16px)}
#selection-preview{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#open-scoped-search{width:100%;margin:.5rem 0}

@media(max-width:1100px) and (min-width:741px){
  body>main{grid-template-columns:230px minmax(300px,1fr) 250px;gap:12px;padding:0 12px}
  .sidebar,.extras-sidebar{padding:14px}
  .content{padding:20px 16px}
  .share-wrap .hint{display:none}
}
@media(max-width:740px){
  body>main{display:block;margin:12px auto 0;padding:0 12px 16px;overflow-y:auto}
  .sidebar,.extras-sidebar,.content{overflow:visible}
  .content{padding:18px 14px}
  .mobile-toolbar{display:flex;gap:8px;justify-content:space-between;margin-bottom:16px}
  button.mobile-only{display:inline-flex}
  #workspace[data-mobile-panel="list"] .content,#workspace[data-mobile-panel="list"] .extras-sidebar,
  #workspace[data-mobile-panel="note"] .sidebar,#workspace[data-mobile-panel="note"] .extras-sidebar,
  #workspace[data-mobile-panel="extras"] .sidebar,#workspace[data-mobile-panel="extras"] .content{display:none}
  .note-toolbar{flex-wrap:wrap}
  .share-wrap{flex-wrap:wrap;justify-content:flex-start}
  .share-wrap .hint{text-align:left}
  .save-row{align-items:flex-start}
  .save-row p{margin:0}
}
