.notebook-content .page-heading { align-items: flex-start; }
.notebook-content .page-heading p:not(.eyebrow) { max-width: 62ch; color: var(--muted); font-size: 12px; line-height: 1.6; }
#notebook-status { min-height: 20px; margin: 16px 0; color: var(--muted); font-size: 12px; }
.notebook-layout { box-sizing: border-box; width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 26px; background: var(--white); }
.notebook-detail-heading h2 { margin: 4px 0 8px; color: var(--ink); font-size: 21px; line-height: 1.35; }
.notebook-detail-heading h2 span { color: var(--muted); font-size: 13px; }
.notebook-detail-heading p:not(.eyebrow) { max-width: 65ch; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.notebook-empty { color: var(--muted); font-size: 12px; line-height: 1.6; }
.notebook-consultation { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.notebook-consultation summary { display: grid; gap: 5px; padding: 16px; color: var(--ink); cursor: pointer; }
.notebook-consultation summary span, .notebook-consultation summary small { color: var(--muted); font-size: 11px; }
.notebook-consultation summary strong { font-size: 14px; }
.notebook-consultation>summary:has(.notebook-study-select){position:relative;padding-left:48px}
.notebook-study-select{position:absolute;left:18px;top:20px;width:17px;height:17px;margin:0;accent-color:#0b5d4d;cursor:pointer}
.notebook-general-study{margin:28px 0 16px;padding-top:22px;border-top:1px solid var(--line)}
.notebook-general-study>[data-study-selection]{padding:11px 17px;border:1px solid #0b5d4d;border-radius:7px;background:#0b5d4d;color:#fff;font:600 12px/1.5 Manrope,sans-serif;cursor:pointer}
.notebook-general-study>[data-study-selection]:disabled{opacity:.5;cursor:default}
.notebook-consultation-body { padding: 0 16px 18px; color: var(--ink); font-size: 12px; line-height: 1.65; }
.notebook-consultation-body > p, .notebook-note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.notebook-source { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.notebook-source-meta { margin: 0; color: #0b5d4d; font-size: 12px; font-weight: 700; }
.notebook-source blockquote { margin: 10px 0; padding-left: 14px; border-left: 2px solid #b8d2c3; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; line-height: 1.65; }
.notebook-source a { color: #0b5d4d; font-size: 12px; font-weight: 700; }
.notebook-source-warning { color: #7c5d20; font-size: 11px; }
.notebook-section { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 20px; }
.notebook-section h3 { margin: 0 0 14px; color: var(--ink); font-size: 15px; }
.notebook-note { margin-top: 9px; border-left: 3px solid #0b5d4d; padding: 8px 12px; background: #f5faf7; }
.notebook-delete-entry { justify-self: end; border: 1px solid #d7b9b5; border-radius: 6px; padding: 6px 10px; background: #fff; color: #8b3630; font: inherit; font-size: 12px; cursor: pointer; }
.notebook-delete-entry:disabled { opacity: .5; cursor: default; }
.notebook-note p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.65; }
.notebook-comment-actions { display: flex; gap: 8px; margin-top: 8px; }
.notebook-comment-actions button { border: 1px solid #cad5ce; border-radius: 5px; padding: 4px 9px; background: #fff; color: #346756; font: inherit; font-size: 11px; cursor: pointer; }
.notebook-comment-actions button:disabled { opacity: .5; cursor: default; }
.notebook-comment-actions button:focus-visible { outline: 2px solid #245d49; outline-offset: 2px; }
.notebook-comment-edit[hidden], [data-comment-view][hidden] { display: none; }
.notebook-comment-edit { margin: 10px 0; }
.notebook-comment-edit label { display: grid; gap: 8px; font-size: 12px; }
.notebook-comment-edit textarea { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid #cad5ce; border-radius: 6px; color: inherit; background: #fff; font: inherit; resize: vertical; }
.consultation-comment-form { display: grid; gap: 9px; margin-top: 18px; }
.consultation-comment-form label { color: var(--ink); font-size: 12px; font-weight: 700; }
.consultation-comment-form textarea { box-sizing: border-box; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--white); color: var(--ink); font: inherit; font-size: 12px; }
.consultation-comment-form button { justify-self: start; border: 1px solid #0b5d4d; border-radius: 8px; padding: 9px 12px; background: #0b5d4d; color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
@media (max-width: 620px) { .notebook-layout { padding: 18px; } }

/* Complete independent chat copies, with per-result lawyer comments. */
.notebook-chat-result{border-top:1px solid #d1c5a7;padding:1.4rem 0;margin-top:1rem}
.notebook-chat-response h2,.notebook-chat-response h3{line-height:1.3}
.notebook-result-text,.notebook-chat-response blockquote,.notebook-note p{white-space:pre-wrap;overflow-wrap:anywhere}
.notebook-report-actions{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;padding:1rem 0}
.notebook-report-actions label{display:flex;gap:.5rem;align-items:center}
.notebook-chat-response .consultation-comment-form{display:grid;gap:.6rem;margin:1rem 0}
.notebook-chat-response textarea{width:100%;display:block}
.notebook-user-comments{border-left:3px solid #aa8f53;padding-left:1rem;background:#faf8f1}
.notebook-ai-label,.notebook-report-origin{font-size:.8rem;color:#6d6b60}
.notebook-report-origin{overflow-wrap:anywhere;margin-top:2rem}

.notebook-report-actions button{border:1px solid #cad5ce;border-radius:7px;background:#f7f9f5;color:#163b31;padding:10px 14px;font:600 .85rem Manrope,Arial,sans-serif;cursor:pointer}.notebook-report-actions button:hover{background:#ecf1e8}.notebook-report-actions button:focus-visible{outline:2px solid #9d844b;outline-offset:2px}

.notebook-print-frame{position:fixed;width:210mm;height:1px;left:-10000px;border:0}
.notebook-consolidation{border:1px solid #c9b785;border-radius:8px;padding:18px;margin:18px 0;overflow-wrap:anywhere}
.notebook-consolidation>h3{margin-top:0}
.notebook-consolidation>section{padding:4px 0;border-bottom:1px solid #e5e7df}
.notebook-group-originals{margin-top:14px;padding:12px;border-left:3px solid #967337}
.notebook-consolidation summary{cursor:pointer;padding:8px 0;font-weight:600}
/* Source titles use the same quiet link treatment as Consulta. */
#notebook-app a.notebook-document-link { color: #5b809e; font: inherit; text-decoration: none; }
#notebook-app .notebook-chat-response a.case-chat-document-link { display: block; }
#notebook-app a.notebook-document-link:hover, #notebook-app a.notebook-document-link:focus-visible { color: #3b6385; text-decoration: underline; }

/* Saved answers reuse Consulta's result, source, table and divider styles. */
.notebook-chat-response.case-chat-turn { color: #203b35; font: 14px/1.65 Manrope,sans-serif; }
.notebook-chat-response summary { display: list-item; padding: 0; color: #346756; font-size: 12px; font-weight: 650; }
.notebook-chat-response small { display: block; margin: 4px 0; }
.notebook-chat-response .case-chat-answer { overflow-wrap: anywhere; }
.notebook-chat-response .notebook-source { margin: 0; border: 0; border-radius: 0; padding: 0; }
.notebook-chat-response .notebook-source blockquote { margin: 8px 0; padding-left: 10px; border-left: 2px solid #a6bbae; color: #58685e; font: inherit; }
.notebook-chat-response .notebook-source a { font: inherit; color: #245d49; }
#notebook-app .notebook-chat-response .notebook-source a.notebook-document-link { display: block; font-size: 11px; font-weight: 700; }
.notebook-chat-response .notebook-group-originals { margin: 10px 0; padding: 0 0 0 8px; border-left: 2px solid #c9b785; }
.notebook-chat-response .notebook-user-comments { margin: 12px 0; padding: 8px 12px; font-size: 12px; }
.notebook-chat-response .notebook-user-comments h4 { margin: 0 0 8px; font-size: 12px; }
.notebook-chat-response .notebook-source .case-chat-source-context > summary,
.notebook-chat-response .notebook-source .case-chat-source-context details > summary { padding: 6px 0; }
.notebook-chat-response .notebook-report-actions { font-size: 12px; }

.notebook-analysis[hidden]{display:none}.notebook-analysis{border:1px solid #d1c5a7;border-radius:9px;padding:20px;margin:12px 0 24px;background:#f8faf7}
.notebook-analysis.notebook-analysis-archive{padding:9px 12px;margin:8px 0 18px;border-color:#e4e9e5;border-radius:6px;background:transparent}
.notebook-consultation .notebook-analysis-archive>summary{display:list-item;list-style-position:inside;padding:0;font-size:11px;font-weight:600;color:#718078}
.notebook-report-comments{margin-top:20px;padding-top:16px;border-top:1px solid #e4e9e5}
.notebook-analysis .notebook-report-comments>[data-study-comments]{border:1px solid #cad5ce;background:#f7f9f5;color:#245d49}
.notebook-comments-dialog .notebook-report-comment-question{padding:12px 14px;background:#f4f7f4;border-radius:7px}
.notebook-report-comment-question>strong{display:block;margin-bottom:5px}
.notebook-report-comment-author{font-weight:600;color:#245d49}
.notebook-comments-dialog form{margin-top:18px}
.notebook-analysis h3{margin:0 0 10px}.notebook-analysis>p{font-size:12px;color:#61736b}.notebook-analysis form{display:grid;gap:12px}.notebook-analysis label{display:grid;gap:9px;font-size:12px;font-weight:600}
.notebook-analysis textarea{width:100%;padding:12px;border:1px solid #cad5ce;border-radius:8px;font:inherit;color:inherit;resize:vertical;background:#fff}.notebook-analysis button{justify-self:start;border:0;border-radius:6px;background:#0b5d4d;color:#fff;padding:9px 14px;font:inherit;font-size:12px;cursor:pointer}.notebook-analysis button:disabled{opacity:.5}
.notebook-analysis label.notebook-analysis-notes{display:flex;align-items:center;gap:8px;font-weight:400}.notebook-analysis-notes input{width:14px;height:14px;margin:0;accent-color:#0b5d4d}
.notebook-analysis-report{border-top:1px solid #d1c5a7;margin-top:22px;padding-top:18px}.notebook-analysis-text p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.75}.notebook-analysis-report small{font-size:11px;color:#61736b}
.notebook-analysis-working{display:flex;align-items:center;gap:9px;font-size:12px}.notebook-analysis-working:before{content:'';width:13px;height:13px;border:2px solid #d6e2da;border-top-color:#0b5d4d;border-radius:50%;animation:notebook-analysis-spin 1s linear infinite}@keyframes notebook-analysis-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.notebook-analysis-working:before{animation:none}}

/* Readable source tables throughout Cuaderno. */
.notebook-content .case-chat-source-table td,.notebook-content .case-chat-source-table th{white-space:normal;overflow-wrap:anywhere}
.notebook-result-text{white-space:pre-wrap;overflow-wrap:anywhere}
.notebook-study-section{margin:18px 0;white-space:normal;overflow-wrap:anywhere}
.notebook-study-section>header{display:flex;align-items:baseline;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:12px}
.notebook-study-section>header h3{margin:0;flex:1;min-width:160px;color:#203b35;font-size:15px;line-height:1.5}
.notebook-study-section>header>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.notebook-study-section>header button,.notebook-studies-index button{border:1px solid #cad5ce;background:#f7f9f5;color:#245d49;padding:6px 10px;border-radius:6px;font:600 11px/1.5 Manrope,sans-serif;cursor:pointer}
.notebook-study-section p{white-space:pre-wrap;font-size:12px;line-height:1.75}
.notebook-study-result-body{white-space:pre-wrap;overflow-wrap:anywhere}
.notebook-studies-index{margin:14px 0;white-space:normal}
.notebook-studies-index>summary{display:list-item;padding:8px 0;font-size:12px;font-weight:650;color:#245d49;cursor:pointer}
.notebook-studies-index button{display:block;text-align:left;margin:8px 0;width:100%;overflow-wrap:anywhere}
.notebook-studies-index button small{display:block;font-size:11px;font-weight:400;color:#61736b}
.notebook-study-index-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;margin:8px 0}
.notebook-study-index-item>[data-rename-study]{width:auto;margin:0;background:transparent;font-size:11px;white-space:nowrap}
.notebook-study-rename{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:end;gap:8px;margin:0}
.notebook-study-rename label{display:grid;gap:4px;font-size:12px}
.notebook-study-rename input{width:100%;box-sizing:border-box;font:inherit;padding:7px 9px}
.notebook-study-rename button{width:auto;margin:0;white-space:nowrap}
.notebook-study-rename p{grid-column:1/-1;margin:0;font-size:12px;min-height:1em}
.notebook-study-index-item>[data-open-study]{margin:0}
.notebook-study-index-item>[data-delete-study]{width:auto;margin:0;border-color:#e3cdca;background:transparent;color:#8b3630;font-size:11px;white-space:nowrap}
.notebook-study-result-actions{display:flex;justify-content:flex-end;margin:10px 0}
.notebook-study-dialog .notebook-study-result-actions [data-delete-study]{background:transparent;color:#8b3630;border-color:#e3cdca;font-size:11px}
.notebook-study-dialog.notebook-study-delete-dialog{width:min(460px,calc(100vw - 36px))}
.notebook-study-delete-dialog p{font-size:13px;line-height:1.7}
.notebook-study-delete-dialog [data-delete-title]{font-weight:600}
.notebook-study-delete-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
.notebook-study-delete-dialog [data-confirm-delete-study]{background:#8b3630;border-color:#8b3630;color:#fff}
@media(max-width:620px){.notebook-study-index-item{grid-template-columns:minmax(0,1fr)}.notebook-study-index-item>[data-delete-study],.notebook-study-index-item>[data-rename-study]{justify-self:end}.notebook-study-rename{grid-template-columns:minmax(0,1fr)}}
.notebook-study-dialog{box-sizing:border-box;width:min(880px,calc(100vw - 36px));max-height:88vh;padding:28px;border:1px solid #c9b785;border-radius:14px;background:#fff;color:#203b35;font:12px/1.7 Manrope,sans-serif;overflow:auto}
.notebook-study-dialog::backdrop{background:rgb(15 35 28 / .45)}
.notebook-study-dialog>header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}
.notebook-study-dialog h2{font-size:21px;line-height:1.4;margin:4px 0;overflow-wrap:anywhere}
.notebook-study-dialog h3{font-size:15px;line-height:1.5}
.notebook-study-dialog h4{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.notebook-study-dialog form{display:grid;gap:12px}
.notebook-study-dialog label{display:grid;gap:9px;font-weight:600}
.notebook-study-dialog .notebook-study-scope{display:flex;flex-wrap:wrap;gap:10px 24px;margin:0;padding:12px 14px;border:1px solid #d8e1dc;border-radius:8px}
.notebook-study-scope legend{padding:0 5px;color:#61736b;font-size:11px}
.notebook-study-dialog .notebook-study-scope label{display:flex;align-items:center;gap:7px;font-weight:400}
.notebook-study-scope input{margin:0;accent-color:#0b5d4d}
.notebook-study-dialog textarea{box-sizing:border-box;width:100%;resize:vertical;padding:12px;border:1px solid #cad5ce;border-radius:8px;font:inherit;color:inherit}
.notebook-study-dialog button{border:1px solid #cad5ce;border-radius:7px;padding:8px 12px;background:#f7f9f5;color:#245d49;font:inherit;cursor:pointer}
.notebook-study-dialog button[type=submit]{background:#0b5d4d;color:#fff;border-color:#0b5d4d}
.notebook-study-dialog button:disabled{opacity:.55;cursor:default}
.notebook-study-dialog button:focus-visible,.notebook-study-section button:focus-visible{outline:2px solid #9d844b;outline-offset:3px}
.notebook-study-dialog .notebook-study-preset{justify-self:start;text-align:left}
.notebook-study-dialog p,.notebook-study-dialog blockquote{white-space:pre-wrap;overflow-wrap:anywhere}
.notebook-study-dialog a{color:#245d49}
.notebook-study-dialog small{display:block;color:#61736b;font-size:11px;margin:8px 0;overflow-wrap:anywhere}
.notebook-study-dialog details>summary{cursor:pointer;color:#245d49;font-weight:600}
.notebook-study-result{padding:12px 0;border-bottom:1px solid #d1c5a7}
.notebook-study-working-result{background:#f8faf7;border-left:3px solid #b29a62;padding:12px 18px;margin:18px 0}
.notebook-study-dialog .case-chat-source-table{overflow-x:auto}
.notebook-study-dialog table{width:100%;border-collapse:collapse}
.notebook-study-dialog td,.notebook-study-dialog th{padding:7px;border:1px solid #d8e1dc;text-align:left;white-space:normal}
@media(max-width:620px){.notebook-study-dialog{padding:18px}.notebook-study-section>header{display:block}.notebook-study-section>header>div{margin:8px 0}}
.notebook-documentary-review { margin-top: 1.5rem; border-top: 1px solid #d9dee5; padding: 1rem 0; }
.notebook-documentary-review > summary { cursor: pointer; font-weight: 600; }
.documentary-review-item { padding: 1rem 0; border-top: 1px solid #e5e7eb; font-size: .875rem; line-height: 1.65; }
.documentary-review-item h4 { font-size: .95rem; margin: .3rem 0 .7rem; }
.documentary-review-proposal { white-space: pre-wrap; }
.documentary-review-source { margin: .75rem 0; overflow-wrap: anywhere; }
.documentary-review-source blockquote { margin: .7rem 0; padding: .6rem .9rem; border-left: 3px solid #b8995a; background: #f8f7f3; white-space: pre-wrap; }
.documentary-review-item details { margin: .5rem 0; }

/* Only full pages copied from Documentos; existing reports keep their layout. */
.document-page-copy { color: #344940; font: 400 13px/1.85 Manrope, Arial, sans-serif; white-space: normal; overflow-wrap: anywhere; }
.document-page-copy p { margin: 0 0 14px; }
.document-page-copy h2 { margin: 20px 0 12px; font: 600 18px/1.4 Manrope, Arial, sans-serif; }
.document-page-copy h3, .document-page-copy h4, .document-page-copy h5, .document-page-copy h6, .document-page-copy .documents-transcript-section { margin: 18px 0 10px; font: 600 13px/1.5 Manrope, Arial, sans-serif; }
.document-page-copy .documents-transcript-caption { color: #626a70; font-size: 12px; }
.document-page-copy table { width: 100%; border-collapse: collapse; font-size: 13px; }
.document-page-copy td, .document-page-copy th { padding: 8px; border-bottom: 1px solid #d8dde1; vertical-align: top; text-align: left; }
.document-page-copy .documents-transcript-table { overflow-x: auto; margin-bottom: 14px; }
.document-page-copy pre { white-space: pre-wrap; font-size: 12px; }
