:root {
  color-scheme: light;
  --ink: #142e3a;
  --muted: #506970;
  --line: #d6e3dd;
  --line-soft: #e7eee9;
  --paper: #f4f7f4;
  --surface: #fff;
  --nav: #16323c;
  --accent: #006c62;
  --hint: #e7f1e8;
  --lime: #caf29c;
  --nav-width: 170px;
  --chat-width: clamp(278px, 22.5vw, 345px);
  --top: 62px;
  --radius-panel: 10px;
  --radius-control: 6px;
  --card-inset: 16px;
  --row-inset: 10px;
  --control-height: 32px;
  --field-line: #bfd3c8;
  --selected: #e5f0e7;
  --assistant-surface: #f8faf7;
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid #168679;
  outline-offset: 3px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p, ul { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shell {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0,1fr) 0;
  grid-template-rows: var(--top) minmax(0,1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.assistant-open .shell { grid-template-columns: var(--nav-width) minmax(0,1fr) var(--chat-width); }
.navigation { grid-row: 1/-1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0 12px 14px; background: var(--nav); color: #f4f8f4; }
.logo { display: flex; align-items: center; gap: 8px; flex: none; min-height: 89px; padding: 0 7px; color: inherit; font-size: clamp(16px,1.3vw,19px); line-height: 1; font-weight: 740; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-note { display: block; margin-top: 7px; color: #a9c6c8; font-size: 11px; font-weight: 520; letter-spacing: .06em; }
.mark { flex: none; position: relative; width: 27px; height: 25px; }
.mark::after, .mark::before { content: ""; position: absolute; top: 4px; width: 13px; height: 17px; border-top: 3px solid var(--lime); border-left: 3px solid var(--lime); transform: skew(-31deg); }
.mark::before { left: 5px; }
.mark::after { left: 11px; top: 10px; height: 12px; }
.navigation nav { display: flex; flex: 1; flex-direction: column; gap: 3px; overflow: auto; }
.nav-label { margin: 17px 12px 4px; color: #9ab1b4; font-size: 11px; font-weight: 610; letter-spacing: .06em; }
.navigation nav a, .nav-bottom a, .nav-bottom button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 39px;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dfebeb;
  text-align: left;
  text-decoration: none;
}
.navigation nav a:hover, .nav-bottom a:hover, .nav-bottom button:hover { background: #23444b; }
.navigation nav a[aria-current=page] { background: #2d4e46; color: #e7f8d7; font-weight: 680; }
.nav-symbol { width: 17px; color: #aac9c7; text-align: center; font-size: 17px; line-height: 1; }
.navigation [aria-current=page] .nav-symbol { color: var(--lime); }
.nav-bottom { margin-top: auto; padding-top: 8px; border-top: 1px solid #39545c; }
.nav-bottom a, .nav-bottom button { min-height: 31px; color: #c5d8d9; font-size: 11px; }

.bar { grid-column: 2/-1; display: flex; align-items: center; justify-content: space-between; gap: 13px; min-width: 0; padding: 0 clamp(18px, 2.75vw, 43px); border-bottom: 1px solid var(--line); background: var(--surface); }
#search { display: flex; align-items: center; gap: 7px; width: min(360px, 48%); height: 34px; padding-left: 11px; border: 1px solid #dce6e0; border-radius: 6px; background: var(--paper); }
.search-icon { position: relative; flex: none; width: 11px; height: 11px; margin-right: 4px; border: 1.4px solid #62817c; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; top: 8px; left: 8px; width: 5px; height: 1px; background: #62817c; transform: rotate(45deg); transform-origin: left; }
#search input { width: 100%; min-width: 0; padding: 5px 0; border: 0; background: transparent; font-size: 12px; }
#search button { padding: 0 9px 0 4px; border: 0; background: transparent; color: var(--accent); font-size: 11px; white-space: nowrap; }
.bar-tools { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.bar-tools time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-tools button, .button, .ghost, .chip, .primary, .more, .prompt {
  padding: 5px 9px;
  border: 1px solid #ceded5;
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--accent);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}
.bar-tools button { padding-inline: 6px; border-color: transparent; background: transparent; }
.bar-tools #toggle-chat { border-left-color: var(--line); border-radius: 0; padding-left: 12px; font-weight: 650; }
.bar-tools button:hover, .button:hover, .chip:hover, .ghost:hover, .more:hover, .prompt:hover { background: var(--hint); text-decoration: none; }
.button, .primary { min-height: var(--control-height); }
a.button { display: inline-flex; align-items: center; }
.primary { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 620; }
.primary:hover { background: #005a52; }
.primary:disabled { opacity: .58; }
.ghost { padding: 4px 6px; border-color: transparent; background: transparent; }
.icon-button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--accent); }
.icon-button:hover { background: var(--hint); }
#toggle-nav { display: none; }

.content { min-width: 0; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #c8dad1 transparent; }
.page { display: grid; align-content: start; gap: 16px; max-width: 1280px; margin-inline: auto; padding: clamp(25px, 2.55vw, 42px) clamp(21px, 2.75vw, 43px) 48px; }
.view-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.view-title h1 { min-width: 0; font-size: clamp(28px, 2.65vw, 38px); font-weight: 760; letter-spacing: -.045em; line-height: 1.16; overflow-wrap: anywhere; }
.view-title p, .metadata, .panel-footnote, .muted, .count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.page-context { overflow-wrap: anywhere; }
.filter-strip { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.filter-strip > :not(:first-child) { border-top: 1px solid var(--line-soft); }
.topic-bar, .filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; padding: 8px var(--card-inset); }
.topic-label { color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.topic-choices { display: flex; flex: 1; flex-wrap: wrap; gap: 5px; min-width: 0; }
.topic-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-left: auto; }
.topic-bar .chip { max-width: 100%; padding: 4px 9px; white-space: normal; overflow-wrap: anywhere; }
.chip[aria-pressed=true] { border-color: #b5cec0; background: #dfede3; color: #185a4c; font-weight: 680; }
.topic-manage { font-size: 12px; white-space: nowrap; }

.spotlights { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.spotlights.single { grid-template-columns: minmax(0,1fr); }
.spotlight {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 164px;
  padding: 16px 20px;
  overflow: hidden;
  border: 1px solid #214b48;
  border-radius: var(--radius-panel);
  background: #143e40;
  color: #f5faef;
  text-align: left;
}
.spotlight:hover { border-color: #6fa492; }
.spotlight-research { border-color: #b9d3c1; background: #e2eee5; color: #173f37; }
.spotlight-top { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; color: #d4eacb; font-size: 11px; }
.spotlight-research .spotlight-top { color: #27584d; }
.spotlight-label { padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px; font-weight: 660; }
.spotlight-title {
  display: -webkit-box;
  max-width: 95%;
  margin: 7px 0 3px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: clamp(17px, 1.4vw, 22px);
  font-weight: 700;
  line-height: 1.36;
  letter-spacing: -.022em;
}
.spotlight .material-meta, .spotlight .material-kind, .spotlight .material-meta span::before { color: #bcd9cb; }
.spotlight-research .material-meta, .spotlight-research .material-kind, .spotlight-research .material-meta span::before { color: #366053; }
.spotlight .material-kind { display: none; }
.spotlight .material-source::before { content: none; }
.spotlight-link { margin-top: auto; padding-top: 9px; color: var(--lime); font-size: 12px; font-weight: 675; }
.spotlight-research .spotlight-link { color: #155444; }
.spotlight:hover .spotlight-link { text-decoration: underline; text-underline-offset: 4px; }
.spotlight:disabled .spotlight-link { visibility: hidden; }
.spotlight-art { position: absolute; z-index: -1; right: -26px; bottom: -59px; width: 146px; height: 156px; transform: rotate(38deg); color: #a0d0b34a; }
.spotlight-research .spotlight-art { transform: rotate(-43deg); color: #72a28960; }
.spotlight-art i { position: absolute; inset: 0; border: 1px solid currentColor; border-radius: 50%; }
.spotlight-art i:nth-child(2) { inset-inline: 25px; }
.spotlight-art i:nth-child(3) { inset-inline: 49px; }

.shelf-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 15px; margin: 4px 0 -6px; }
.shelf-title h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.018em; }
.source-status { font-size: 11px; }
.discovery-grid, .topic-materials { display: grid; align-items: start; gap: 14px; }
.discovery-grid { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); }
.topic-materials { grid-template-columns: minmax(0,1.14fr) repeat(2,minmax(0,1fr)); }
.topic-materials[data-columns="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.topic-materials[data-columns="1"] { grid-template-columns: minmax(0,1fr); }
.panel {
  --panel-inset: var(--card-inset);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 9px;
  min-height: 49px;
  padding: 8px var(--panel-inset);
  border-bottom: 1px solid var(--line-soft);
}
.panel-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.panel-header :is(h2,h3) { font-size: 16px; font-weight: 720; line-height: 1.35; letter-spacing: -.015em; }
.component-mark {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-control);
  background: var(--hint);
  color: var(--accent);
  font-size: 14px;
  font-weight: 620;
  line-height: 1;
}
.items, .topic-list { padding: 0 var(--panel-inset, var(--card-inset)); list-style: none; }
.item, .topic-list li { padding: var(--row-inset) 0; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.item:last-child, .topic-list li:last-child { border-bottom: 0; }
.item-title, .text-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 670;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.item-title:hover, .text-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.item .item-title { padding-right: 13px; }
.item-arrow { position: absolute; top: 0; right: 1px; color: #527775; font-size: 16px; line-height: 1.12; }
.material-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 1px 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.material-meta .material-kind { color: var(--accent); font-weight: 660; }
.material-source::before, .material-time::before { content: "·"; margin-right: 5px; color: #648783; }
.material-time { font-variant-numeric: tabular-nums; }
.material-flag { padding: 0 4px; border-radius: 3px; background: var(--hint); color: #275e52; }
.important-flag { background: #fff0d8; color: #775213; }
.item .material-meta { margin-top: 4px; }
.excerpt, .topic-list small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.48;
}
.item .excerpt { margin-top: 4px; }
.component-panel .item-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.component-panel .excerpt { -webkit-line-clamp: 2; }
.material-supplements { padding-bottom: 3px; border-top: 1px solid var(--line-soft); }
.material-supplements summary { padding: 8px var(--panel-inset); color: var(--accent); font-size: 12px; font-weight: 640; cursor: pointer; }
.material-supplements[open] summary { padding-bottom: 3px; }
.supplement-preview { display: block; margin: 3px 0 2px 11px; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 480; text-overflow: ellipsis; white-space: nowrap; }
.material-supplements[open] .supplement-preview { display: none; }
.topic-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 5px; }
.topic-list small { grid-column: 1/-1; -webkit-line-clamp: 1; }
.count { color: var(--accent); white-space: nowrap; }
.panel-footnote { padding: 2px var(--panel-inset, var(--card-inset)) 11px; font-size: 11px; }
.empty, .loading, .panel-state { padding: 12px var(--panel-inset, var(--card-inset)) 14px; }
.panel-state { color: var(--muted); font-size: 12px; }
.panel-state.state-loading::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--accent); }
.panel-state.state-error { color: #7c4b21; }
.page > .panel-state { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.more { margin: 6px 16px 12px; }
.soft-error { padding: 9px 12px; border: 1px solid #e5d7c2; border-radius: 7px; background: #fff9ee; color: #695231; font-size: 12px; }

.assistant { display: none; grid-column: 3; grid-row: 2; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--line); background: var(--assistant-surface); }
.assistant-open .assistant { display: flex; }
.assistant-heading { display: flex; align-items: center; gap: 9px; min-height: 64px; padding: 10px var(--card-inset); border-bottom: 1px solid var(--line-soft); }
.assistant-heading :is(h2,h3) { font-size: 15px; font-weight: 720; }
.assistant > header small { display: block; color: var(--muted); font-size: 11px; }
.assistant > header small::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 6px 2px 0; border-radius: 50%; background: #4f8c71; }
.assistant > header button { width: 30px; height: 30px; margin-left: auto; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--muted); font-size: 22px; line-height: 1; }
.assistant > header button:hover { background: var(--hint); }
.extension { display: inline-grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #dcefe0; color: #16624e; font-size: 22px; line-height: 1; }
.chatlog { display: flex; flex: 1; flex-direction: column; gap: 9px; min-height: 0; padding: 17px; overflow: auto; }
.chat-start { padding-top: 12px; }
.chat-start .extension { width: 39px; height: 39px; margin-bottom: 8px; }
.chat-start h2 { margin-bottom: 5px; font-size: 16px; }
.chat-start p { color: var(--muted); font-size: 13px; line-height: 1.65; }
#ask { padding: 11px 14px 15px; border-top: 1px solid var(--line-soft); }
.ask-prompts { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.prompt { padding: 3px 7px; color: #315b50; font-size: 11px; }
.chat-composer { position: relative; border: 1px solid var(--field-line); border-radius: var(--radius-control); background: var(--surface); }
.chat-composer:focus-within { outline: 2px solid #168679; outline-offset: 1px; }
.chat-composer textarea { display: block; width: 100%; min-height: 70px; max-height: 160px; padding: 9px 43px 9px 10px; resize: vertical; border: 0; border-radius: inherit; outline: 0; background: transparent; font-size: 13px; }
.chat-composer > button { position: absolute; right: 8px; bottom: 8px; width: 30px; min-height: 30px; padding: 0; border-radius: var(--radius-control); font-size: 17px; line-height: 1; }
#chat-error, #setup-error { color: #983e33; font-size: 12px; }
#chat-error:not(:empty) { margin-top: 5px; }
.cites { max-height: 30%; padding: 8px 14px; overflow: auto; border-top: 1px solid var(--line); }
.cite-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: #ecf4ec; font-size: 12px; }
.cite-row + .cite-row { margin-top: 4px; }
.cite-text { min-width: 0; }
.cite-text > span { display: block; margin-bottom: 2px; overflow: hidden; color: var(--ink); font-weight: 630; text-overflow: ellipsis; white-space: nowrap; }
.cite-row .material-meta { font-size: 10px; }
.bubble { padding: 8px 10px; border-radius: 8px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: end; background: var(--hint); }
.bubble.ai { border: 1px solid var(--line); background: var(--surface); }
.assistant-answer { line-height: 1.65; white-space: normal; }
.assistant-answer > * + * { margin-top: 7px; }
.assistant-answer h3 { margin-block-start: 11px; font-size: 13px; }
.assistant-answer .answer-bullet { position: relative; padding-left: 12px; }
.answer-bullet::before { content: ""; position: absolute; top: .72em; left: 1px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
#drawer-scrim { position: fixed; z-index: 5; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #142f3959; }

.reader { max-width: 880px; padding: clamp(18px, 2.6vw, 35px); }
.reader h1 { margin: 10px 0; font-size: clamp(23px, 2.65vw, 35px); line-height: 1.3; letter-spacing: -.025em; overflow-wrap: anywhere; }
.reader .material-meta { margin: 6px 0; font-size: 12px; }
.reader .back { margin: 0 0 3px -6px; }
.reader-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0 17px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.reader-actions .primary, .reader-actions .button { padding: 6px 11px; }
.document { font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.document h2, .reader-sources h2 { margin: 5px 0 8px; font-size: 16px; }
.other-excerpts, .reader-sources, .material-file { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.other-excerpts summary { color: var(--accent); font-size: 13px; cursor: pointer; }
.other-excerpts p { margin: 8px 0; }
.reader-sources .items { padding: 0; }
.material-file { display: flex; flex-wrap: wrap; gap: 5px 8px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.text-button { margin-top: 5px; color: var(--accent); }
.histogram { display: grid; grid-template-columns: repeat(24,minmax(0,1fr)); gap: 3px; height: 175px; padding: 18px 16px 27px; }
.hist-column { position: relative; display: flex; flex-direction: column; justify-content: end; height: 100%; }
.hist-column i { display: block; border-radius: 3px 3px 0 0; background: #4f9387; }
.hist-column span { position: absolute; top: 100%; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }

dialog { width: min(430px,100% - 28px); margin: auto; padding: var(--card-inset); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #142f397a; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -3px 0 12px; padding: 3px 0 10px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 20px; line-height: 1.25; font-weight: 740; letter-spacing: -.02em; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dialog-footer > :last-child { margin-left: auto; }
.dialog-footer p { color: var(--muted); font-size: 11px; }
#setup-fields { display: grid; gap: 5px; margin: 9px 0; }
#setup-fields label { font-size: 12px; font-weight: 650; }
.control { width: 100%; min-width: 0; min-height: var(--control-height); padding: 6px 8px; border: 1px solid var(--field-line); border-radius: var(--radius-control); background: var(--surface); font: inherit; color: inherit; }
.control::placeholder, .chat-composer textarea::placeholder { color: var(--muted); opacity: .84; }
#setup-error:not(:empty) { margin: 4px 0; }
.settings-topic { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-block: 12px; padding: 9px 11px; border-radius: 7px; background: var(--hint); }
.settings-topic span { color: var(--muted); font-size: 12px; }
.settings-group { min-width: 0; margin: 0 0 11px; padding: 7px 10px 9px; border: 1px solid var(--line); border-radius: 7px; }
.settings-group legend { padding-inline: 4px; font-size: 12px; font-weight: 670; }
.settings-window, .settings-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.settings-window { margin: 3px 9px 2px 0; white-space: nowrap; }
.settings-window input, .settings-check input { margin: 0; accent-color: var(--accent); }
.settings-column { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-block: 5px; }
.settings-column + .settings-column { border-top: 1px solid var(--line-soft); }
.settings-order { display: flex; align-items: center; gap: 5px; }
.settings-order button { min-width: 30px; font-size: 15px; line-height: 1.1; }
.settings-order button:disabled { opacity: .44; }
.settings-default { margin-block: 0 9px; }
.settings-note { margin-bottom: 10px; }
#home-settings-status:not(:empty) { margin-bottom: 7px; color: #983e33; font-size: 12px; }

@media (min-width: 1650px) {
  :root { --nav-width: 190px; }
  .navigation { padding-inline: 17px; }
}
@media (max-width: 1280px) {
  :root { --nav-width: 153px; }
  .navigation { padding-inline: 9px; }
  .page { padding-inline: 21px; }
  .spotlight { padding-inline: 15px; }
  .topic-materials { gap: 9px; }
  .topic-materials .panel { --panel-inset: 11px; }
}
@media (max-width: 1119px) {
  .shell, .assistant-open .shell { grid-template-columns: var(--nav-width) minmax(0,1fr); }
  .assistant { position: fixed; z-index: 6; inset: 0 0 0 auto; width: min(375px,100%); box-shadow: -8px 0 24px #142f3926; }
}
@media (max-width: 800px) {
  .topic-materials[data-columns="3"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topic-materials[data-columns="3"] > :first-child { grid-column: 1/-1; }
}
@media (max-width: 719px) {
  :root { --top: 53px; }
  .shell, .assistant-open .shell { grid-template-columns: minmax(0,1fr); }
  .bar { grid-column: 1; padding-inline: 10px; gap: 7px; }
  .bar-tools { gap: 1px; }
  :root { --card-inset: 13px; }
  .bar-tools time { display: none; }
  .bar-tools button { padding-inline: 4px; font-size: 11px; }
  .bar-tools #toggle-chat { padding-left: 5px; }
  #toggle-nav { display: block; flex: none; }
  #search { flex: 1; min-width: 0; width: auto; padding-left: 7px; }
  #search button { padding-right: 5px; }
  .navigation { display: none; position: fixed; z-index: 6; inset: 0 auto 0 0; width: min(220px,85vw); }
  .nav-open .navigation { display: flex; }
  .page { gap: 13px; padding: 19px 14px 34px; }
  .view-title p { font-size: 11px; }
  .discovery-grid { grid-template-columns: minmax(0,1fr); }
  #ask { padding-bottom: max(15px,env(safe-area-inset-bottom)); }
}
@media (max-width: 490px) {
  .spotlights, .topic-materials[data-columns] { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .topic-materials[data-columns="3"] > :first-child { grid-column: auto; }
  .spotlight { min-height: 138px; padding: 13px 15px; }
  .topic-bar { gap: 5px 7px; }
  .topic-bar .chip { padding-inline: 6px; }
  .topic-choices { flex-basis: 65%; }
}

.new-topic { border-color: #a9cab8; background: #e8f2e9; font-weight: 670; }
.custom-board { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.custom-board > :only-child { grid-column: 1/-1; }
.discover-page .discovery-grid[data-columns="1"] { grid-template-columns: minmax(0,1fr); }
.topic-pulse { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 7px; height: 135px; }
.widget-rules { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 5px 12px; margin: 7px 16px 15px; font-size: 12px; }
.widget-rules dt { color: var(--muted); }
.widget-rules dd { margin: 0; overflow-wrap: anywhere; }

#topic-studio { width: min(1000px,100% - 26px); max-height: calc(100dvh - 32px); }
.studio-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.35fr); align-items: start; gap: 14px; }
.studio-assistant { position: sticky; top: 0; min-width: 0; background: var(--assistant-surface); }
.studio-log { display: flex; flex-direction: column; gap: 8px; min-height: 116px; max-height: 280px; padding: 12px var(--card-inset); overflow: auto; }
.studio-log .bubble { max-width: 100%; line-height: 1.55; }
.studio-log .bubble.me { margin-left: 14px; }
.studio-log .bubble .button { display: block; margin-top: 5px; }
.studio-chat-form { padding: 0 var(--card-inset) 13px; }
.studio-editor { min-width: 0; }
.studio-section + .studio-section { margin-top: 12px; }
.studio-basics, .studio-rules, .studio-widgets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.studio-basics { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); padding: 12px var(--card-inset) 8px; }
.studio-rules { padding: 0 var(--card-inset); }
.studio-basics label, .studio-field { display: grid; gap: 4px; min-width: 0; font-size: 12px; font-weight: 630; }
.studio-flags { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12px; }
.studio-preview { margin: 10px var(--card-inset); padding: 7px 9px; border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.studio-preview summary { color: var(--accent); font-size: 12px; font-weight: 630; cursor: pointer; }
.studio-preview-results { display: grid; gap: 4px; padding: 7px 5px 2px 19px; font-size: 12px; }
.studio-preview p { padding: 6px 0 1px; }
.studio-period { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.studio-section-head select { width: auto; padding-block: 4px; }
.studio-widgets { padding: 12px var(--card-inset); }
.studio-widget { display: flex; justify-content: space-between; align-items: flex-start; gap: 7px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; }
.studio-widget:has(:checked) { border-color: var(--field-line); background: var(--selected); }
.studio-widget input { flex: none; margin: 5px 0 0; accent-color: var(--accent); }
.studio-widget-text { display: grid; align-self: start; gap: 4px; }
.studio-widget-name { display: flex; align-items: center; gap: 6px; }
.studio-widget strong { font-size: 12px; font-weight: 650; }
.studio-widget small { color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
#studio-error:not(:empty) { margin: 7px 0; color: #983e33; font-size: 12px; }
@media (max-width: 660px) {
  .custom-board { grid-template-columns: minmax(0,1fr); gap: 10px; }
  #topic-editor > .dialog-footer { position: sticky; z-index: 1; bottom: 0; padding-bottom: 4px; background: var(--paper); }
  #topic-studio { max-height: calc(100dvh - 22px); padding: 13px; }
  .studio-grid { grid-template-columns: minmax(0,1fr); }
  .studio-assistant { position: static; }
  .studio-log { min-height: 52px; max-height: 155px; }
}
@media (max-width: 365px) {
  .studio-widgets { grid-template-columns: minmax(0,1fr); }
}

/* Topic-led product design preview. Shared controls keep the Linker News visual language. */
.topic-design {
  --nav: #10382f;
  --nav-width: 216px;
  --chat-width: clamp(276px, 21vw, 328px);
  --ink: #172e28;
  --muted: #4e685d;
  --accent: #006c55;
  --paper: #f1f6f1;
  --hint: #e5f1e9;
  --line: #d7e4db;
  --line-soft: #e8efe9;
  --selected: #e2f0e5;
  --assistant-surface: #f8fbf8;
}
.topic-design .navigation { padding-inline: 13px; }
.topic-design .logo { min-height: 88px; padding: 0 8px 5px; font-size: 19px; }
.topic-design .logo-note { color: #a8c5b6; }
.topic-design #nav { padding-right: 2px; }
.design-rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin: 7px 9px 1px; }
.design-rail-heading > span { font-size: 13px; font-weight: 670; }
.topic-design .nav-label { color: #a9c4b7; }
.design-add { width: 27px; height: 27px; padding: 0; border: 1px solid #487364; border-radius: 6px; background: #285246; color: #e8f4e9; font-size: 18px; line-height: 1; }
.design-add:hover { background: #376d59; }
.design-theme-list { display: grid; gap: 3px; }
.topic-design .navigation nav .design-topic-link { gap: 8px; min-height: 37px; padding-inline: 10px 8px; color: #e2efe7; }
.topic-design .navigation nav a:hover { background: #224d40; }
.topic-design .navigation nav [aria-current] { background: #2a5949; color: #f3fbe7; font-weight: 690; }
.design-topic-dot { width: 6px; height: 6px; flex: none; border: 1px solid #a6cabe; border-radius: 50%; }
.design-topic-link[aria-current] .design-topic-dot { border-color: #c6f29c; background: #c6f29c; }
.design-topic-name { min-width: 0; flex: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.design-topic-preview { flex: none; color: #c0d9ca; font-size: 10px; }
.topic-design #nav > .nav-label { margin-top: 19px; }
.topic-design .nav-bottom { border-color: #365e50; }
.topic-design .nav-bottom :is(a,button):hover { background: #285246; }
.topic-design .assistant > .assistant-heading { border-bottom-color: var(--line); }
.topic-design .page { max-width: 1270px; padding-block-start: clamp(25px, 3vw, 45px); }
.topic-design .view-title h1 { color: #16342b; }
.topic-design .design-dashboard .view-title h1 { font-size: clamp(31px, 3.6vw, 49px); font-weight: 760; letter-spacing: -.055em; }
.design-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 12px; min-height: 45px; border-bottom: 1px solid var(--line); }
.design-tabs, .design-page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.design-tabs { align-self: stretch; }
.design-tabs a { display: flex; align-items: center; min-height: 41px; padding: 2px 12px 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; white-space: nowrap; }
.design-tabs a:first-child { padding-left: 0; }
.design-tabs a[aria-current] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 710; }
.design-tabs a:hover { color: var(--accent); text-decoration: none; }
.design-page-actions .button { min-height: 29px; }
.design-leads { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 12px; align-items: stretch; }
.design-leads.design-single-lead { grid-template-columns: minmax(0,1fr); }
.design-focus {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 149px;
  padding: 13px 15px 12px;
  overflow: hidden;
  border: 1px solid #c4ddcd;
  border-radius: 11px;
  background: #e7f2e9;
  color: #183c2e;
  text-align: left;
}
.design-focus-wire { border-color: #1b5847; background: #164c3e; color: #f0f8ee; }
.design-focus-wire::after { content: ""; position: absolute; right: -38px; bottom: -93px; z-index: -1; width: 184px; height: 190px; transform: rotate(-33deg); border: 1px solid #9fc2ac48; border-radius: 50%; box-shadow: 0 0 0 19px #9fc2ac27, 0 0 0 40px #9fc2ac14; }
.design-focus-heading { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 690; }
.design-focus-heading small { margin-left: auto; color: #4c6d5d; font-size: 11px; font-weight: 500; white-space: nowrap; }
.design-focus-wire .design-focus-heading small { color: #c1d8cb; }
.design-focus-wire .component-mark { background: #3c6a56; color: #e7f4d9; }
.design-focus-title { display: -webkit-box; margin: 7px 0 9px; overflow: hidden; font-size: clamp(17px, 1.55vw, 23px); font-weight: 740; letter-spacing: -.012em; line-height: 1.37; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.design-focus-report .design-focus-title { font-size: clamp(16px, 1.25vw, 20px); }
.design-focus-footer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 11px; margin-top: auto; }
.design-focus-footer .material-meta { gap: 2px 7px; }
.design-focus-footer .material-kind { display: none; }
.design-focus-footer .material-source::before { content: none; }
.design-focus-wire .material-meta, .design-focus-wire .material-time::before { color: #c4ded1; }
.design-focus-action { margin-left: auto; padding-block: 1px; color: var(--accent); font-size: 11px; font-weight: 690; white-space: nowrap; }
.design-focus-wire .design-focus-action { color: #ddf2b8; }
.design-focus:hover .design-focus-action { text-decoration: underline; }
.design-focus:disabled .design-focus-action { visibility: hidden; }
.design-lanes { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.design-lane { display: grid; min-width: 0; gap: 11px; align-items: start; }
.design-lane:only-child { grid-column: 1/-1; }
.design-lane-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 1px; }
.design-lane-heading h2 { font-size: 18px; letter-spacing: -.025em; }
.design-timeline .item { display: grid; grid-template-columns: 54px minmax(0,1fr); align-items: start; column-gap: 9px; }
.design-timeline .item > :not(.design-story-time) { grid-column: 2; min-width: 0; }
.design-story-time { display: grid; grid-row: span 3; justify-items: start; gap: 1px; padding-top: 1px; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.35; }
.design-story-time time { font-size: 14px; font-weight: 730; }
.design-story-time small { color: var(--muted); font-size: 10px; }
.design-timeline .material-time { display: none; }
.design-evidence .topic-material-panel .excerpt { -webkit-line-clamp: 1; }
.design-evidence .topic-material-panel .item-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

@media (max-width: 1260px) { .topic-design { --nav-width: 193px; } }
@media (max-width: 930px) { .topic-design .page { padding-inline: 20px; } }
@media (max-width: 800px) {
  .design-lanes { grid-template-columns: minmax(0,1fr); gap: 18px; }
}
@media (max-width: 719px) {
  .topic-design .navigation { width: min(243px,85vw); }
  .topic-design .page { padding: 18px 13px 33px; }
  .topic-design .design-dashboard .view-title h1 { font-size: clamp(27px, 8vw, 36px); }
  .design-toolbar { row-gap: 2px; }
  .design-tabs { gap: 5px; }
  .design-tabs a { min-height: 38px; padding-inline: 8px; font-size: 12px; }
  .design-page-actions .button { padding-inline: 7px; }
  .design-lane-heading h2 { font-size: 17px; }
}
@media (max-width: 510px) {
  .design-leads { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .design-focus { min-height: 123px; padding: 10px 12px; }
  .design-timeline .item { grid-template-columns: 40px minmax(0,1fr); column-gap: 7px; }
  .design-story-time time { font-size: 13px; }
}

.report-fields { display:grid; gap:10px; }
.report-fields label { display:grid; gap:4px; min-width:0; color:var(--ink); font-size:12px; font-weight:650; }
.report-fields small, .web-query { color:var(--muted); font-size:11px; font-weight:500; }
.report-fields textarea, .energy-topic-fields textarea { resize:vertical; }
.report-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.report-error:not(:empty) { margin-top:8px; color:#88382c; font-size:12px; }
.energy-topic-fields { margin-top:9px; }
.design-topic-notes { display:grid; gap:5px; padding:11px 14px; border:1px solid var(--line); border-radius:var(--radius-panel); background:var(--surface); }
.design-topic-notes strong { color:var(--accent); font-size:12px; }
.design-topic-notes p { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; }
.energy-ask-tools { display:flex; flex-wrap:wrap; align-items:center; gap:6px 9px; margin-bottom:8px; font-size:12px; }
.energy-ask-tools .settings-check { color:var(--accent); white-space:nowrap; }
#ask-topic { min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.web-query { display:grid; flex-basis:100%; gap:3px; }
.web-query .control { font-size:12px; }
.web-sources { display:grid; gap:4px; margin-bottom:8px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.theme-transfer { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.design-category { margin-top:5px; }
.design-category-label { margin:4px 9px 0; color:#b1cbbd; font-size:10px; font-weight:630; }
#topic-category-field { grid-column:1/-1; }
.topic-ask { background:var(--hint); border-color:var(--field-line); font-weight:650; }
.material-meta .inline-ask { flex:none; margin-left:auto; padding:0 5px; color:var(--accent); font-size:11px; font-weight:650; }
.material-meta .inline-ask:hover { border-color:var(--field-line); }
.web-sources a { overflow-wrap:anywhere; font-size:12px; }
.report-note { margin:0 0 14px; padding:8px 12px 11px; border-radius:var(--radius-control); background:var(--hint); }
@media (max-width: 460px) { .report-pair { grid-template-columns:minmax(0,1fr); } }

.assistant-controls { display: flex; gap: 3px; margin-left: auto; }
.assistant-controls button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--muted); font-size: 21px; line-height: 1; }
.assistant-controls button:hover { background: var(--hint); }
.assistant-controls [aria-pressed="true"] { color: var(--accent); background: var(--hint); }
@media (min-width:1120px) {
  body[data-workspace="energy"].assistant-open .shell { grid-template-columns: var(--nav-width) minmax(0,1fr) 0; }
}
[data-workspace="energy"] .assistant {
  --chat-forest: #102e25;
  --chat-ink: #15342b;
  --chat-mint: #c5f5be;
  --chat-muted: #526b60;
  --chat-line: #dce8df;
  --chat-radius: 19px;
  position: fixed;
  z-index: 12;
  inset: auto;
  max-width: 100%;
  color: var(--chat-ink);
  border: 1px solid #709888;
  border-radius: var(--chat-radius);
  background: linear-gradient(150deg, #f0f7f1, #fbfcfa 66%);
  box-shadow: 0 0 0 1px #fff7, 0 5px 14px #0e38262e, 0 23px 64px #0c2d2252;
  transform-origin: bottom right;
}
[data-workspace="energy"].assistant-open .assistant { animation: open-assistant 190ms cubic-bezier(.18,.8,.34,1) both; }
@keyframes open-assistant {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
[data-workspace="energy"] .assistant > header {
  flex: none;
  min-height: 61px;
  padding: 8px 12px;
  gap: 10px;
  border-radius: calc(var(--chat-radius) - 1px) calc(var(--chat-radius) - 1px) 0 0;
  border-bottom: 1px solid #529273;
  background: radial-gradient(ellipse at 85% -42%, #337c5e, transparent 72%), var(--chat-forest);
  color: #f2fff2;
}
[data-workspace="energy"] .assistant-title { min-width: 0; }
[data-workspace="energy"] .assistant-title h2 { font-size: 16px; line-height: 1.25; }
[data-workspace="energy"] .assistant > header small { margin-top: 3px; color: #b0cbbd; font-size: 10px; }
[data-workspace="energy"] .assistant > header small::before { background: #9bb1a4; }
[data-workspace="energy"] .assistant > header small[data-connection="online"]::before { background: #aff7a0; box-shadow: 0 0 7px #b4ffa789; }
[data-workspace="energy"] .assistant > header small[data-connection="offline"]::before { background: #efbf82; }
[data-workspace="energy"] .assistant-mark {
  width: 38px;
  height: 38px;
  border: 1px solid #a0dcb27d;
  border-radius: 11px;
  background: linear-gradient(142deg, #518568ac, #214c3b);
  color: var(--chat-mint);
  text-shadow: 0 0 12px #b1ffa066;
  box-shadow: inset 0 1px #efffe333;
}
[data-workspace="energy"] .assistant-controls { gap: 3px; }
[data-workspace="energy"] .assistant-controls button {
  width: 33px;
  height: 33px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cfdfd4;
  font-size: 19px;
  transition: background-color 140ms, border-color 140ms;
}
[data-workspace="energy"] .assistant-controls button:is(:hover,:focus-visible,[aria-pressed="true"]) {
  background: #e1ffeb17;
  border-color: #c8ffce32;
  color: #f1fff4;
}
[data-workspace="energy"] .assistant #move-chat { cursor: grab; touch-action: none; }
[data-workspace="energy"] .assistant #move-chat:active { cursor: grabbing; }
[data-workspace="energy"] .assistant #close-chat:hover { background: #ffd6c622; }
[data-workspace="energy"] .assistant .chatlog { min-height: 0; padding: 15px; gap: 13px; scrollbar-color: #acccba transparent; }
.chat-signal { display: none; }
[data-workspace="energy"] .chat-start-legacy { display: none; }
[data-workspace="energy"] .chat-start {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 137px;
  flex: none;
  display: grid;
  align-content: center;
  padding: 18px min(27%, 120px) 19px 17px;
  border: 1px solid #2d5e47;
  border-radius: 13px;
  background: radial-gradient(ellipse at 102% 6%, #447e57, transparent 74%), #102d24;
  box-shadow: inset 0 1px #ffffff20, 0 4px 12px #263c2e12;
}
[data-workspace="energy"] .chat-start::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(#c1ffca14 1px, transparent 1px), linear-gradient(90deg, #c1ffca14 1px, transparent 1px);
  background-size: 19px 19px;
  mask-image: linear-gradient(90deg, transparent 26%, #000);
}
[data-workspace="energy"] .chat-start h2 { margin-bottom: 6px; color: #f2fff1; font-size: clamp(22px, 2.05vw, 30px); line-height: 1.2; letter-spacing: -.035em; }
[data-workspace="energy"] .chat-start p { max-width: 30em; color: #c5dbcb; font-size: 12px; }
[data-workspace="energy"] .chat-signal {
  position: absolute;
  display: grid;
  place-items: center;
  width: 121px;
  height: 121px;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  z-index: -1;
  color: #e1ffd1;
  font-size: 32px;
  line-height: 1;
}
.chat-signal::before, .chat-signal::after, .chat-signal i {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #c0ffc442;
  border-radius: 47% 53% 50% 50%;
  transform: rotate(-35deg);
}
.chat-signal::after { inset: 16px; transform: rotate(36deg); border-color: #d2ffcc61; }
.chat-signal i { inset: 34px; transform: rotate(-13deg); background: radial-gradient(#b4ff9a4d, #93f6870b); }
.chat-signal span { z-index: 1; text-shadow: 0 0 25px #b8ff9a; }
[data-workspace="energy"] .assistant .bubble {
  border-radius: 13px;
  padding: 11px 13px;
  box-shadow: 0 1px 4px #28483408;
}
[data-workspace="energy"] .assistant .bubble.me {
  max-width: 87%;
  border: 1px solid #d0e2d4;
  border-bottom-right-radius: 4px;
  background: #e6f2e8;
  color: #1c392e;
}
[data-workspace="energy"] .assistant .bubble.ai {
  border: 1px solid var(--chat-line);
  border-top-left-radius: 4px;
  background: #fff;
}
[data-workspace="energy"] .assistant-answer { font-size: 13px; line-height: 1.76; }
[data-workspace="energy"] .assistant-answer h3 { color: #1a654e; }
[data-workspace="energy"] .assistant .bubble[data-phase="working"] {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 45px;
  color: #366451;
}
[data-workspace="energy"] .assistant .bubble[data-phase="working"]::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: none;
  border: 2px solid #c5e3d2;
  border-top-color: #24795d;
  border-radius: 50%;
  animation: assistant-loading 900ms linear infinite;
}
@keyframes assistant-loading { to { transform: rotate(360deg); } }
[data-workspace="energy"] .assistant .bubble[data-phase="error"] { color: #7d3a30; border-color: #ead7cf; }
[data-workspace="energy"] .assistant .web-sources {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--chat-line);
  border-radius: 8px;
  background: #f3f9f4;
}
[data-workspace="energy"] .assistant .web-sources strong { color: #305f4c; font-size: 12px; }
[data-workspace="energy"] .assistant .cites {
  max-height: 24%;
  padding: 8px 13px;
  border-top: 1px solid var(--chat-line);
  background: #f2f8f3;
}
[data-workspace="energy"] .assistant .cite-heading { display: block; margin-bottom: 5px; color: #3c6251; font-weight: 650; }
[data-workspace="energy"] .assistant .cite-row {
  justify-content: flex-start;
  gap: 8px;
  border-color: #d8e6da;
  border-radius: 9px;
  background: #fff;
}
[data-workspace="energy"] .assistant .cite-row > button { flex: none; margin-left: auto; }
.cite-glyph {
  position: relative;
  width: 14px;
  height: 17px;
  flex: none;
  border: 1px solid #438065;
  border-radius: 3px;
  background: #e5f2e8;
}
.cite-glyph::after {
  content: "";
  position: absolute;
  inset: 5px 3px 4px;
  border-block: 1px solid #438065;
}
[data-workspace="energy"] .assistant #ask {
  flex: none;
  padding: 10px 13px 12px;
  border-top: 1px solid var(--chat-line);
  border-radius: 0 0 calc(var(--chat-radius) - 1px) calc(var(--chat-radius) - 1px);
  background: #fbfdfa;
}
[data-workspace="energy"] .assistant .prompt {
  min-height: 26px;
  padding-inline: 9px;
  border-color: #dbe9dc;
  border-radius: 20px;
  background: #f0f7f1;
  font-weight: 640;
}
[data-workspace="energy"] .assistant .prompt:hover { border-color: #94c3a4; background: #e7f4e9; }
[data-workspace="energy"] .assistant .energy-ask-tools { gap: 4px 9px; color: var(--chat-muted); }
[data-workspace="energy"] .assistant .settings-check { gap: 5px; font-weight: 630; }
[data-workspace="energy"] .assistant .settings-check input { accent-color: #237554; }
[data-workspace="energy"] .assistant .chat-composer {
  border-color: #bacfc1;
  border-radius: 12px;
  box-shadow: 0 2px 7px #1f3b2610;
}
[data-workspace="energy"] .assistant .chat-composer:focus-within { outline: 1px solid #2e8b66; border-color: #79ac90; }
[data-workspace="energy"] .assistant .chat-composer textarea { min-height: 64px; padding: 10px 47px 9px 11px; }
[data-workspace="energy"] .assistant .chat-composer > button {
  right: 6px;
  bottom: 6px;
  width: 33px;
  min-height: 33px;
  border-radius: 9px;
  border-color: #256448;
  background: linear-gradient(145deg, #2b7957, #19513b);
  box-shadow: inset 0 1px #dbffe646, 0 2px 4px #173c2c27;
}
[data-workspace="energy"] .assistant .chat-composer > button:hover:not(:disabled) { background: #2d7958; }
.resize-grip {
  position: absolute; z-index: 1; top: -5px; left: -5px; width: 22px; height: 22px;
  border: 1px solid #79ac90; border-radius: 7px; background: #184233;
  box-shadow: 0 1px 4px #193d2c55;
  cursor: nwse-resize; touch-action: none;
}
.resize-grip:hover { background: #30785a; }
.resize-grip::before, .resize-grip::after { content: ""; position: absolute; left: 5px; height: 1px; background: #bceebb; transform: rotate(-45deg); }
.resize-grip::before { top: 7px; width: 6px; }
.resize-grip::after { top: 11px; width: 11px; }
.float-chat {
  position: fixed; z-index: 6; bottom: max(19px, env(safe-area-inset-bottom)); right: max(19px, env(safe-area-inset-right));
  display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 5px 10px 5px 6px;
  border: 1px solid #518268; border-radius: 14px; color: #f2fff2;
  background: linear-gradient(133deg, #22563f, #102f25 73%);
  box-shadow: inset 0 1px #e1ffe12e, 0 7px 24px #173f3140;
  font-weight: 690; transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.float-chat:hover { transform: translateY(-2px); box-shadow: inset 0 1px #e1ffe165, 0 9px 26px #173f3158; }
.float-chat .launch-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #86bb9a77;
  border-radius: 9px; background: #59946b52; color: #d0ffc5; font-size: 21px; text-shadow: 0 0 9px #bdffa365;
}
.float-chat kbd { padding: 1px 4px; border: 1px solid #8aaf9b55; border-radius: 4px; color: #c7dbcd; font-size: 10px; line-height: 1.6; white-space: nowrap; }
:is(.assistant-open,.nav-open) .float-chat { display: none; }
@media (max-width:599px) {
  .float-chat { bottom: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-right)); padding-right: 12px; }
  .float-chat kbd { display: none; }
  [data-workspace="energy"] .assistant .chatlog { padding: 12px; }
  [data-workspace="energy"] .assistant > header { min-height: 55px; }
  [data-workspace="energy"] .chat-start { min-height: 124px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-workspace="energy"].assistant-open .assistant,
  [data-workspace="energy"] .assistant .bubble[data-phase="working"]::before { animation: none; }
  .float-chat { transition: none; }
}
.energy-ask-tools #monitor-question { margin-left: auto; min-height: 26px; padding-inline: 8px; }
.answer-monitor { margin-top: 9px; color: var(--accent); }
.reader-origin { align-self: center; color: var(--muted); font-size: 12px; }
.danger-action { color: #923d31; }
.monitor-toolbar, .monitor-heading, .monitor-info, .monitor-actions, .monitor-keywords { display: flex; align-items: center; gap: 8px 12px; }
.monitor-toolbar, .monitor-heading { justify-content: space-between; }
.monitor-toolbar { flex-wrap: wrap; padding-block-end: 10px; border-bottom: 1px solid var(--line); }
.monitor-list { display: grid; gap: 12px; }
.monitor-card { min-width: 0; padding: var(--card-inset); }
.monitor-card > * + * { margin-block-start: 9px; }
.monitor-heading { align-items: flex-start; }
.monitor-heading h2 { font-size: 18px; overflow-wrap: anywhere; }
.monitor-status, .monitor-keyword { display: inline-flex; align-items: center; border-radius: 5px; font-size: 12px; }
.monitor-status { flex: none; max-width: 40%; padding: 3px 8px; color: var(--accent); background: var(--hint); font-weight: 640; }
.monitor-status.paused { color: var(--muted); background: var(--paper); }
.monitor-keywords, .monitor-info, .monitor-actions { flex-wrap: wrap; }
.monitor-keyword { padding: 2px 7px; border: 1px solid var(--line-soft); }
.monitor-info { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.monitor-hit { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.monitor-answer { overflow-wrap: anywhere; }
.monitor-evidence h3 { color: var(--muted); font-size: 12px; }
.monitor-evidence .items { padding: 0; }
.monitor-evidence .items .item { padding-inline: 0; }
.monitor-archive summary { cursor: pointer; color: var(--accent); font-size: 13px; }
#monitor-topic { padding: 7px 9px; border-radius: var(--radius-control); background: var(--selected); }
#monitor-editor .dialog-footer { justify-content: flex-end; }

[data-workspace="energy"] .assistant > header { cursor: grab; touch-action: none; }
[data-workspace="energy"] .assistant > header:active { cursor: grabbing; }
[data-workspace="energy"] .assistant-controls button { cursor: pointer; }
.float-chat { touch-action: none; }
.float-chat.being-dragged { cursor: grabbing; transform: none; transition: none; }
.workspace-welcome {
  padding: clamp(22px,4vw,48px);
  border: 1px solid #315e4a;
  border-radius: 14px;
  background: radial-gradient(ellipse at 93% 105%, #39765a, transparent 75%), #123529;
  color: #f1fbf1;
}
.workspace-welcome h2 { font-size: clamp(26px, 4.7vw, 54px); font-weight: 740; line-height: 1.16; letter-spacing: -.045em; }
.workspace-welcome p { max-width: 36em; margin-top: 8px; color: #c7dfd0; }
.workspace-picker { display: grid; justify-items: start; gap: 16px; min-width: 0; }
.workspace-picker > :is(form,section) { width: 100%; }
.workspace-compose { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.workspace-compose input { flex: 1 1 230px; min-height: 42px; }
.workspace-compose > button { min-height: 38px; }
.workspace-presets { display: grid; gap: 8px; }
.workspace-presets h2, .workspace-manage-bar h2 { font-size: 16px; }
.workspace-topic-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,235px),1fr)); gap: 10px; }
.workspace-starter, .workspace-topic { display: grid; align-content: space-between; justify-items: start; gap: 9px; min-width: 0; padding: 13px; }
.workspace-starter h3, .workspace-topic h3 { overflow-wrap: anywhere; }
.workspace-starter .metadata { color: var(--muted); }
.workspace-topic-actions, .workspace-manage-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.workspace-manage-bar { justify-content: space-between; }
.workspace-empty { padding: var(--card-inset); }
.workspace-empty > * + * { margin-top: 7px; }
#topic-catalog { width: min(720px, calc(100% - 24px)); }
.calendar-date { display: flex; align-items: center; gap: 7px; }
.calendar-row { display: flex; align-items: baseline; gap: 12px; }
.calendar-row time { flex: none; min-width: 44px; color: var(--accent); font-variant-numeric: tabular-nums; }
.calendar-row h3 { font-size: 14px; font-weight: 660; }
.monitor-preview-sources { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--hint); }
.monitor-preview-sources h3 { font-size: 13px; }
.monitor-preview-sources p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.monitor-appendix { border: 1px solid var(--line); border-radius: 9px; background: #f9fcf9; }
.monitor-appendix > summary { padding: 9px 11px; color: var(--accent); cursor: pointer; font-weight: 650; }
.monitor-appendix-body { display: grid; gap: 9px; }
.monitor-original { padding: 9px 11px; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.monitor-original h3 { margin-bottom: 3px; font-size: 14px; }
.monitor-original-text { margin-block: 8px; line-height: 1.72; white-space: pre-wrap; }

.calendar-toolbar { display: grid; gap: 11px; padding: 13px; }
.calendar-controls, .calendar-labels { display: flex; gap: 6px 9px; align-items: center; flex-wrap: wrap; }
.calendar-range { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.calendar-controls .control { min-height: 31px; font-size: 12px; }
.calendar-select { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.calendar-controls .calendar-search { flex: 1 1 160px; width: auto; }
.calendar-countdown { color: var(--accent); font-size: 12px; font-weight: 650; }
.calendar-days { display: grid; gap: 11px; }
.calendar-data { list-style: none; padding: 0 var(--card-inset); }
.calendar-data-row { display: grid; grid-template-columns: minmax(49px,.15fr) minmax(0,1fr) minmax(0,.8fr); align-items: start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.calendar-data-row:first-child { border-top: none; }
.calendar-event-time { display: grid; gap: 2px; }
.calendar-event-time time { color: var(--accent); font-weight: 690; font-variant-numeric: tabular-nums; }
.calendar-event h3 { color: var(--ink); font-size: 14px; line-height: 1.4; }
.calendar-labels { margin-top: 3px; color: var(--muted); font-size: 11px; }
.calendar-stars { color: #85631d; }
.calendar-numbers { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px 6px; margin: 0; font-variant-numeric: tabular-nums; }
.calendar-numbers > div { min-width: 0; }
.calendar-numbers dd { margin: 0; font-weight: 630; overflow-wrap: anywhere; }
.calendar-numbers dt, .calendar-delta { color: var(--muted); font-size: 11px; }
.calendar-delta { display: block; }
.calendar-delta.up, .calendar-impact.up { color: #a13a2b; }
.calendar-delta.down, .calendar-impact.down { color: #18704f; }
.calendar-soon-tag { padding: 0 4px; border-radius: 3px; color: var(--accent); background: var(--hint); }
.calendar-landed { animation: calendar-publish 1.5s ease-out; }
@keyframes calendar-publish { from { background: #cff1da; } }
.calendar-missed .calendar-numbers dd { color: var(--muted); }
@media (max-width:850px) {
  .calendar-data-row { grid-template-columns: 50px minmax(0,1fr); }
  .calendar-numbers { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .calendar-landed { animation: none; } }

.assistant-quick { display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; }
.assistant-quick #add-chat-sources { flex: none; padding: 0 6px; min-height: 26px; color: var(--accent); font-size: 11px; font-weight: 660; }
#source-picker { width: min(740px, calc(100% - 22px)); }
#source-search { display: flex; align-items: center; gap: 6px; }
#source-keyword { min-width: 0; flex: 1; }
#source-search button { flex: none; }
.source-types { display: flex; flex-wrap: wrap; margin: 9px 0; gap: 5px; }
.source-results { max-height: min(51dvh,490px); overflow: auto; }
.source-options { list-style: none; margin: 0; padding: 0; }
.source-option { display: grid; grid-template-columns: 17px minmax(0,1fr); align-items: start; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.source-option:has(:checked) { background: var(--hint); }
.source-option:hover { background: #edf6ee; }
.source-option input { accent-color: var(--accent); }
.source-option strong { overflow-wrap: anywhere; }
.source-option small { display: block; margin-top: 2px; color: var(--muted); }

.brief-settings { display: flex; gap: 8px 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: var(--card-inset); }
.brief-settings h2 { font-size: 17px; }
.brief-settings [role="status"] { margin-top: 5px; }
.personal-edition .brief-answer { padding: var(--card-inset); }
.personal-edition .monitor-appendix { margin: 0 var(--card-inset) var(--card-inset); }
.brief-legacy > summary { padding: 10px var(--card-inset); cursor: pointer; color: var(--accent); font-weight: 630; }
.iam-entry { margin-top: 13px; }
.iam-locked .shell, .iam-locked.assistant-open .shell { grid-template-columns: minmax(0, 1fr); }
.iam-locked .navigation, .iam-locked .bar, .iam-locked #float-chat, .iam-locked .assistant { display: none; }
.iam-locked .content { grid-column: 1; grid-row: 1 / -1; }
.calendar-controls > input[type="date"] { width: auto; max-width: 100%; flex: none; }
.calendar-select { flex: none; white-space: nowrap; }
.calendar-select .control { width: auto; max-width: 135px; }
.assistant-source-link { width: 100%; min-height: 0; padding: 2px; color: var(--accent); text-align: left; overflow-wrap: anywhere; }
