/* A service notebook is a navigable investigation brief, with one editable document. */
body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) { background:#f5f6f3; }
body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar { width:184px;padding:24px 15px; }
body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) main { margin-left:184px;padding:0 30px;max-width:1900px; }
body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) header { height:58px; }
#notebook:has(#editor-screen:not([hidden])) { padding-top:20px; }
#notebook:has(#editor-screen:not([hidden])) .compact { margin:12px 0 22px; }
#notebook:has(#editor-screen:not([hidden])) h1 { font-size:30px;letter-spacing:-1px; }
#notebook .editor-toolbar { margin-bottom:0;padding:0 0 18px;border-bottom:1px solid var(--line);gap:8px; }
#notebook .segmented { background:#e9ede7;border:0;padding:3px;border-radius:8px; }
#notebook .segmented button { font-size:12px;padding:7px 13px;background:transparent;border:0; }
#notebook .segmented button.active { background:#fff;color:#244e3c;box-shadow:0 1px 4px #1a39200b; }
#save-status { font-size:10px; }
#notebook #publish-notebook { font-size:12px;padding:9px 15px;margin-left:auto; }
#notebook #undo-change { border:0;background:transparent;color:#718073;font-size:10px; }
.notebook-brief { padding:24px 0; }
.brief-title { display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:15px; }
.brief-title .eyebrow { font-size:9px;letter-spacing:1.4px;margin:0 0 5px; }
.brief-title h2 { font-size:20px;letter-spacing:-.5px;margin-bottom:5px; }
.brief-title p { font-size:12px;margin:0;color:#738074; }
.gap-link { flex-shrink:0;background:#fff9ec;border-color:#e8d9b8;color:#896229;font-size:11px;padding:8px 12px; }
.gap-link:hover { background:#fbf0d9; }
.notebook-source-map { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px; }
.source-summary { display:flex;text-align:left;align-items:flex-start;gap:10px;padding:14px;border-radius:10px;background:#fff;min-width:0; }
.source-summary:hover { background:white;border-color:#98b2a2;box-shadow:0 3px 12px #173b2010; }
.source-summary.unattached { background:transparent;border-style:dashed; }
.source-mark { display:grid;place-items:center;width:30px;height:30px;flex-shrink:0;border-radius:8px;background:#f0f1ef;font-size:10px;font-weight:700;color:#526055; }
.source-summary.datadog .source-mark { background:#f1eafa;color:#744aa1; }
.source-summary.aws .source-mark { background:#fcf1df;color:#94621f;font-size:9px; }
.source-summary-info { display:flex;flex-direction:column;min-width:0;gap:3px; }
.source-summary-info strong { font-size:12px;font-weight:600; }
.source-resource { font-size:10px;color:#657569;overflow-wrap:anywhere;line-height:1.5; }
.source-check { font-size:9px;color:#7c857d;line-height:1.5; }
.source-check.limited { color:#916426; }
.source-arrow { font-size:13px;color:#94a197;margin-left:auto; }
#editor-layout { display:grid;grid-template-columns:150px minmax(0,1fr) 310px;gap:20px;align-items:start; }
.notebook-outline { position:sticky;top:26px;min-width:0;padding-top:13px; }
.outline-label { display:block;font-size:9px;letter-spacing:1.3px;color:#8a938b;margin:0 0 16px 9px; }
.section-links { display:grid;gap:5px; }
.section-link { display:flex;gap:10px;padding:12px 9px;background:transparent;border:1px solid transparent;border-radius:8px;text-align:left;align-items:flex-start;width:100%; }
.section-link:hover { background:#edf0e9; }
.section-link.active { background:#e7eee4;border-color:#d7e2d2; }
.section-number { font:10px/1.8 ui-monospace,monospace;color:#8b998b; }
.section-link.active .section-number { color:#41714e; }
.section-link-label { display:flex;flex-direction:column;gap:4px;min-width:0; }
.section-link-label strong { font-size:11px;font-weight:550;line-height:1.4; }
.section-link-label small { font-size:9px;color:#8a9387;line-height:1.4; }
.gaps-section-link { margin-top:9px;border-top-color:#e4e7de;border-radius:0 0 8px 8px; }
.gaps-section-link strong { color:#92692c; }
.outline-note { margin:24px 9px 0;padding-top:18px;border-top:1px solid #dfe5da;font-size:9px;color:#6a7c67; }
.outline-note p { font-size:10px;color:#90998d;line-height:1.6;margin-top:7px; }
#editor-layout .document { border:0;background:transparent;border-radius:0;box-shadow:none;overflow:visible; }
.document-top { padding:0 0 13px;display:flex;align-items:center;gap:8px;font-size:10px;border:0;background:transparent; }
.document-top>div { display:flex;flex-direction:column;gap:4px; }
.document-label { color:#63725e;letter-spacing:1px;font-size:9px; }
#document-meta { color:#8d978a;font-size:9px; }
#structure-notebook { margin-left:auto;font-size:10px;padding:7px 0; }
.format-toolbar { position:sticky;top:8px;border:1px solid #dde4d8;border-radius:8px;margin-bottom:14px;background:#fff;box-shadow:0 3px 12px #25352206;padding:6px;z-index:3; }
.format-toolbar button { font-size:11px;padding:5px 7px; }
.format-toolbar select { width:120px;font-size:10px;padding:5px 6px;border:0; }
#document-editor { min-height:0; }
#document-editor .notebook-prose { padding:0;min-height:0;color:#3c493b;font-size:13px;line-height:1.75;white-space:pre-wrap; }
#document-editor .notebook-prose.ProseMirror-focused { box-shadow:none; }
#document-editor .notebook-prose>.notebook-block { margin:0;background:#fff;border-left:1px solid #dde4d8;border-right:1px solid #dde4d8;padding:0 24px 14px; }
#document-editor .notebook-prose>.section-first { border-top:1px solid #dde4d8;border-radius:11px 11px 0 0;padding-top:24px;scroll-margin-top:74px; }
#document-editor .notebook-prose>.section-last { border-bottom:1px solid #dde4d8;border-radius:0 0 11px 11px;padding-bottom:24px;margin-bottom:18px; }
#document-editor .notebook-prose>.section-first.section-last { border-radius:11px; }
#document-editor .notebook-prose>h2 { display:flex;gap:12px;align-items:baseline;font-size:19px;line-height:1.4;letter-spacing:-.35px;color:#273c2a;font-weight:580; }
#document-editor .notebook-prose>h2:before { content:attr(data-section-number);font:10px/1.8 ui-monospace,monospace;color:#96a88d;letter-spacing:0; }
#document-editor .notebook-prose p { font-size:13px;line-height:1.85;margin:0 0 9px;color:inherit; }
#document-editor .notebook-prose>p { margin:0; }
#document-editor .notebook-prose>ul,#document-editor .notebook-prose>ol { padding-left:43px; }
#document-editor .notebook-prose>ul[data-type=taskList] { padding-left:24px; }
#document-editor .notebook-prose li { padding-left:3px; }
#document-editor .notebook-prose li::marker { color:#91a58a; }
#document-editor .notebook-prose h3 { font-size:14px;color:#344e34;letter-spacing:-.1px; }
#document-editor .notebook-prose>.section-gaps { background:#fffdf6;border-color:#e7ddc4; }
#document-editor .notebook-prose>h2.section-gaps { color:#805e2c; }
#document-editor .notebook-prose>h2.section-gaps:before { color:#b29c76; }
#document-editor .notebook-prose .tableWrapper { margin:0;background:white;padding:0 24px 16px;border-inline:1px solid #dde4d8;overflow:auto; }
#document-editor .notebook-prose table { margin:0;white-space:normal;font-size:12px; }
#document-editor .notebook-prose td,#document-editor .notebook-prose th { padding:10px;border-color:#e5e9df;vertical-align:top; }
#document-editor .notebook-prose td p,#document-editor .notebook-prose th p { font-size:12px;line-height:1.65;margin:0; }
#document-editor .notebook-prose table:has(tr:first-child>:nth-child(2):last-child) tr>*:first-child { width:27%; }
#document-editor .notebook-prose .tableWrapper.section-gaps { background:#fffdf6;border-color:#e7ddc4; }
#document-editor .notebook-prose td code { overflow-wrap:anywhere; }
#document-editor .notebook-prose th { background:#f5f7f1;color:#68785e;font-weight:550; }
#document-editor .notebook-prose pre { overflow-wrap:anywhere; }
.document-foot { padding:0 3px 12px;border:0;font-size:9px;gap:8px; }
.template-gaps { border:1px dashed #d4dccf;border-radius:8px;padding:12px;font-size:11px;color:#76826f; }
.notebook-copilot { top:12px;border:1px solid #dae3d5;border-radius:12px;background:#fbfcf8;box-shadow:0 2px 8px #18312004; }
.notebook-copilot .assistant-header { padding:16px;gap:10px;background:#f0f5eb; }
.notebook-copilot .assistant-header strong { font-size:12px; }
.notebook-copilot .assistant-header small { font-size:10px;color:#7d8d72; }
.notebook-copilot .pig-avatar { width:30px;height:30px;background:#e0ebd6;color:#4f7940;display:grid;place-items:center;border-radius:9px; }
.copilot-shortcuts { display:flex;gap:7px;padding:12px 14px 0; }
.copilot-shortcuts button { font-size:10px;padding:6px 10px;border-radius:20px;background:white; }
.chat-feed { max-height:calc(100vh - 430px);min-height:210px; }
.chat-welcome { padding:12px 2px; }
.chat-message.user { background:#eef3e8;border-color:#e1e8d9; }
.chat-message.assistant .chat-copy { max-height:320px;overflow:auto; }
.chat-message.assistant .chat-copy.expanded { max-height:none; }
.chat-expand { font-size:10px;padding:4px 0;border:0;background:transparent;color:var(--green); }
.copilot-boundary { font-size:9px!important;color:#909b87; }
#chat-message { background:#fff; }
.copilot-toggle { display:none; }
.published-banner { font-size:11px;padding:12px 16px;margin-top:14px; }
.notebook-brief { padding:16px 0 22px; }
.brief-title { margin-bottom:12px; }
.brief-title .eyebrow,.brief-title p { display:none; }
.brief-title h2 { font-size:14px;letter-spacing:-.2px;margin:0; }
#notebook:has(#editor-screen:not([hidden])) #nb-eyebrow { display:none; }
#notebook:has(#editor-screen:not([hidden])) .compact { margin:8px 0 18px; }
#notebook:has(#editor-screen:not([hidden])) h1 { font-size:28px;margin-bottom:8px; }
.source-summary:focus-visible,.section-link:focus-visible { outline:2px solid #7fad83;outline-offset:2px; }
@media (max-width:1400px) and (min-width:1181px) {
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar { width:64px;padding:24px 10px; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar .brand { font-size:25px; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar .snout,body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .workspace-label,body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar-foot { display:none; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) nav { margin-top:30px; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) nav button { font-size:0;padding:12px;text-align:center; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) nav button span { font-size:17px;margin:0; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) main { margin-left:64px;padding:0 24px; }
  #editor-layout { grid-template-columns:150px minmax(0,1fr) 300px;gap:18px; }
}
@media (max-width:1180px) {
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar { width:64px;padding:24px 10px; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar .brand { font-size:25px; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar .snout,body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .workspace-label,body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar-foot { display:none; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) nav { margin-top:30px; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) nav button { font-size:0;padding:12px;text-align:center; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) nav button span { font-size:17px;margin:0; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) main { margin-left:64px;padding:0 22px; }
  #editor-layout { grid-template-columns:144px minmax(0,1fr);gap:18px; }
  .notebook-copilot { display:none; }
  .notebook-copilot.drawer-open { display:flex;position:fixed;z-index:10;top:18px;bottom:18px;right:18px;width:min(380px,calc(100vw - 32px));max-height:none;box-shadow:0 12px 90px #18382138; }
  .notebook-copilot.drawer-open .chat-feed { max-height:none; }
  .copilot-close { display:block;margin-left:auto;padding:3px 6px;font-size:18px;background:transparent;border:0; }
  .copilot-toggle { display:block;position:fixed;bottom:20px;right:22px;z-index:9;font-size:12px;box-shadow:0 4px 25px #1e56372b; }
  .source-summary { padding:12px;gap:8px; }
  .source-mark { width:25px;height:27px;font-size:9px; }
  .source-arrow { display:none; }
  .brief-title p { max-width:380px; }
}
@media (max-width:650px) {
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) .sidebar { display:none; }
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) main { margin-left:0;padding:0 16px; }
  #notebook:has(#editor-screen:not([hidden])) h1 { font-size:25px; }
  #notebook .editor-toolbar { flex-wrap:wrap;gap:7px; }
  #notebook #undo-change { display:none; }
  #notebook #save-notebook { padding:5px 7px;font-size:10px; }
  #save-status { margin-left:auto;font-size:9px; }
  .brief-title { align-items:flex-start;flex-direction:column;gap:10px; }
  .brief-title h2 { font-size:19px; }
  .brief-title p { font-size:11px; }
  .notebook-source-map { grid-template-columns:1fr;gap:7px; }
  .source-summary { align-items:center;padding:10px 12px; }
  .source-summary-info { display:grid;grid-template-columns:auto 1fr;gap:2px 10px;flex:1; }
  .source-summary-info strong { font-size:11px; }
  .source-resource { text-align:right;font-size:10px; }
  .source-check { grid-column:1/-1;font-size:9px; }
  .notebook-brief { padding:20px 0 15px; }
  #editor-layout { display:block; }
  .notebook-outline { position:static;padding:0;margin-bottom:18px; }
  .outline-label,.outline-note { display:none; }
  .section-links { display:flex;overflow:auto;gap:6px;padding-bottom:4px; }
  .section-link { width:auto;flex-shrink:0;border:1px solid #dce4d7;padding:9px 11px;gap:6px;border-radius:7px; }
  .section-link-label small { display:none; }
  .section-link-label strong { font-size:10px; }
  .gaps-section-link { margin:0; }
  #document-editor .notebook-prose>.notebook-block { padding-inline:18px; }
  #document-editor .notebook-prose>ul,#document-editor .notebook-prose>ol { padding-left:35px; }
  #document-editor .notebook-prose>.section-first { padding-top:20px; }
  #document-editor .notebook-prose>.section-last { padding-bottom:20px; }
  #document-editor .notebook-prose>h2 { font-size:18px; }
  #document-editor .notebook-prose .tableWrapper { padding-inline:12px; }
  #document-editor .notebook-prose td,#document-editor .notebook-prose th { padding:7px; }
  #document-editor .notebook-prose td p,#document-editor .notebook-prose th p { font-size:11px; }
  .format-toolbar { top:6px; }
  .format-toolbar select { width:106px; }
  #structure-notebook { font-size:10px; }
}

@media (max-width:900px) {
  #notebook:has(#editor-screen:not([hidden])) .compact { flex-direction:row;gap:12px;align-items:flex-start; }
  #notebook:has(#editor-screen:not([hidden])) .compact>div { min-width:0; }
  #notebook:has(#editor-screen:not([hidden])) #nb-state { flex-shrink:0;margin-top:3px; }
}
@media (max-width:650px) {
  body:has(#notebook:not([hidden]) #editor-screen:not([hidden])) header { height:44px; }
  #notebook:has(#editor-screen:not([hidden])) { padding-top:10px; }
  #notebook:has(#editor-screen:not([hidden])) h1 { font-size:23px; }
  #notebook:has(#editor-screen:not([hidden])) .compact { margin:6px 0 16px; }
  .brief-title { flex-direction:row;align-items:center;gap:8px; }
  .brief-title h2 { font-size:14px; }
  .gap-link { font-size:10px;padding:6px 8px; }
  .notebook-brief { padding:14px 0; }
  .source-summary { padding:8px 10px; }
  #notebook .editor-toolbar { padding-bottom:12px; }
}
