/* Science Journal: canvas, superfícies e azul. Systentando: grafite e lima. */
:root {
  color-scheme:light;
  --bg:#f2f6fc;
  --surface:#fff;
  --ink:#182638;
  --muted:#526479;
  --line:#dce5f1;
  --blue:#137fec;
  --blue-ink:#174c91;
  --lime:#d5ff40;
  --graphite:#15151a;
  --radius:16px;
  font:14px/1.5 "Avenir Next",Avenir,system-ui,sans-serif;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  color:var(--ink);
  background:var(--bg);
}

button,input,select {
  font:inherit;
}

button,select {
  cursor:pointer;
}

button:focus-visible,input:focus-visible,select:focus-visible {
  outline:2px solid var(--blue);
  outline-offset:3px;
}

button {
  color:inherit;
}

svg {
  vertical-align:middle;
  flex-shrink:0;
}

h1,h2,h3,p {
  margin:0;
}

button {
  border:0;
  background:none;
}

a {
  color:var(--blue-ink);
}

.shell {
  display:grid;
  grid-template-columns:235px minmax(0,1fr);
  min-height:100vh;
}

.sidebar {
  background:var(--surface);
  border-right:1px solid var(--line);
}

.sidebar-content {
  position:sticky;
  top:0;
  height:100dvh;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  padding:27px 18px 19px;
  gap:26px;
}

.brand {
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 8px;
}

.brand b {
  display:block;
  font-size:16px;
  letter-spacing:-.45px;
}

.brand small {
  display:block;
  font-size:11px;
  color:var(--muted);
}

.brandmark {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:10px;
  background:var(--graphite);
  color:var(--lime);
}

.nav-label,.eyebrow {
  font:700 10px/1.3 ui-monospace,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}

.nav-label {
  padding:0 9px;
  margin:0 0 10px;
}

.nav {
  display:grid;
  gap:5px;
}

.nav button {
  display:flex;
  text-align:left;
  align-items:center;
  gap:11px;
  padding:10px 11px;
  border-radius:9px;
  color:var(--muted);
  font-weight:600;
}

.nav button.active,.nav button:hover {
  background:#eaf2fc;
  color:var(--blue-ink);
}

.new {
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:700;
}

.new:hover,.secondary:hover {
  background:#eef5ff;
}

.sidebar-foot {
  margin-top:auto;
  border-top:1px solid var(--line);
  padding:14px 8px 0;
  display:flex;
  align-items:center;
  gap:9px;
  font-size:12px;
  color:var(--muted);
}

.avatar {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  background:#e8eef9;
  color:#284875;
  border-radius:50%;
  font-weight:800;
}

.main {
  min-width:0;
}

.topbar {
  height:67px;
  padding:0 31px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:#fff;
  gap:12px;
}

.crumb {
  color:var(--muted);
  font-size:13px;
}

.crumb b {
  color:var(--ink);
}

.badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--line);
  border-radius:100px;
  padding:4px 9px;
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  white-space:nowrap;
}

.badge::before {
  content:"";
  width:6px;
  height:6px;
  background:#5b7b21;
  border-radius:50%;
}

.wrap {
  max-width:1450px;
  margin:auto;
  padding:25px 31px 36px;
}

.hero {
  position:relative;
  overflow:hidden;
  background:linear-gradient(106deg,#fff 42%,#edf5ff 100%);
  border:1px solid var(--line);
  border-radius:20px;
  padding:24px 27px;
}

.hero::before {
  content:"";
  position:absolute;
  inset:0 0 0 65%;
  pointer-events:none;
  background:radial-gradient(circle,#8cabd575 1px,transparent 1.5px) 0 0/18px 18px;
  mask-image:linear-gradient(to right,transparent,#000);
}

.hero>* {
  position:relative;
}

.hero .eyebrow {
  color:var(--blue-ink);
  display:flex;
  align-items:center;
  gap:8px;
}

.hero .eyebrow:before {
  content:"";
  width:8px;
  height:8px;
  border-radius:2px;
  background:var(--lime);
  border:1px solid #6e8616;
}

.hero h1 {
  font:500 clamp(31px,4vw,50px)/1.08 Georgia,serif;
  letter-spacing:-.045em;
  margin:8px 0;
}

.hero p {
  color:var(--muted);
  max-width:580px;
}

.search {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  margin-top:17px;
  gap:10px;
  align-items:start;
  border:1px solid #cfdaea;
  border-radius:12px;
  background:#fff;
  padding:10px 10px 10px 13px;
  max-width:820px;
  color:var(--blue-ink);
}

.search > svg {
  margin-top:4px;
}

.search textarea {
  border:0;
  background:transparent;
  min-width:0;
  width:100%;
  padding:0 2px;
  color:var(--ink);
  font:inherit;
  line-height:1.5;
  resize:vertical;
}

.search textarea:focus {
  outline:none;
}

.search .primary {
  align-self:end;
}

.search:focus-within {
  border-color:var(--blue);
}

.primary,.secondary {
  border-radius:9px;
  font-weight:750;
  padding:8px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  white-space:nowrap;
}

.primary {
  background:var(--graphite);
  color:var(--lime);
}

.primary:hover {
  background:#33333f;
}

.secondary {
  border:1px solid var(--line);
  background:white;
}

.tabs {
  display:flex;
  gap:22px;
  border-bottom:1px solid var(--line);
  margin:15px 0 17px;
  overflow:auto;
}

.tabs button {
  white-space:nowrap;
  padding:11px 2px;
  border-bottom:2px solid transparent;
  font-weight:650;
  color:var(--muted);
}

.tabs button[aria-current] {
  color:var(--blue-ink);
  border-color:var(--blue);
}

.research-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(245px,305px);
  gap:17px;
  align-items:start;
}

.research-main {
  min-width:0;
}

.research-sidebar {
  position:sticky;
  top:18px;
  min-width:0;
  grid-auto-rows:max-content;
  max-height:calc(100dvh - 36px);
  overflow-y:auto;
}

.sidebar-sources {
  margin:0;
  padding:5px;
  list-style:none;
}

.sidebar-sources button {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:8px;
  width:100%;
  padding:9px 11px;
  border-radius:8px;
  text-align:left;
  font-weight:650;
}

.sidebar-sources button:hover,
.sidebar-sources button[aria-pressed=true] {
  background:#eef5ff;
}

.sidebar-sources small {
  display:block;
  color:var(--muted);
  font-weight:500;
}

.panel {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
}

.panel-head {
  padding:15px 17px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.panel-head h2 {
  font-size:17px;
  letter-spacing:-.35px;
}

.panel-head p {
  font-size:12px;
  color:var(--muted);
}

.body {
  padding:17px;
}

.graph {
  background:radial-gradient(circle,#bdcee4 1px,transparent 1.2px) 0 0/16px 16px,#f8fbff;
  min-height:220px;
  padding:8px 8px 0;
}

.graph svg {
  display:block;
  width:100%;
  height:auto;
  max-height:320px;
}

.graph svg g[role=button] {
  cursor:pointer;
  outline:none;
}

.graph svg g[role=button]:hover rect:first-of-type,.graph svg g[role=button]:focus-visible rect:first-of-type,.graph svg g[aria-pressed=true] rect:first-of-type {
  stroke:var(--blue);
  stroke-width:2;
}

.graph text {
  font-family:system-ui,sans-serif;
}

.legend {
  display:flex;
  flex-wrap:wrap;
  gap:13px;
  padding:10px 17px;
  color:var(--muted);
  font-size:11px;
  border-top:1px solid var(--line);
}

.legend i {
  width:8px;
  height:8px;
  border-radius:50%;
  display:inline-block;
  background:#9dc7fb;
  margin-right:5px;
}

.legend i.green {
  background:#9ab929;
}

.muted {
  color:var(--muted);
}

.score {
  background:#edf6d7;
  color:#344c13;
  border-radius:5px;
  padding:2px 5px;
  font:700 11px ui-monospace,monospace;
  white-space:nowrap;
}

.row {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.summary {
  padding:16px 17px;
}

.summary h2 {
  font-size:17px;
  margin:3px 0 6px;
}

.summary p {
  font-size:13px;
  color:var(--muted);
}

.summary .row {
  margin-top:10px;
}

.stack {
  display:grid;
  gap:14px;
}

.kicker {
  color:var(--blue-ink);
}

.quote {
  background:#eef5fe;
  border-left:3px solid #72a8eb;
  padding:12px 14px;
  margin:11px 0;
  color:#26405e;
}

.prose {
  max-width:740px;
}

.prose h3 {
  margin-top:14px;
}

.prose p {
  margin:8px 0;
}

.cite {
  color:var(--blue-ink);
  background:#e7f2ff;
  border-radius:5px;
  font-weight:750;
  padding:0 5px;
}

.filter {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}

.filter select {
  border:1px solid var(--line);
  border-radius:7px;
  padding:4px 6px;
  background:#fff;
  color:var(--ink);
}

.message {
  color:var(--muted);
  padding:17px;
}

.detail .secondary {
  margin-top:9px;
}

.detail h3 {
  font-size:16px;
  margin:7px 0;
}

.empty {
  color:var(--muted);
  padding:22px;
}

.toast {
  position:fixed;
  bottom:16px;
  right:18px;
  background:var(--graphite);
  color:white;
  border-radius:9px;
  padding:9px 13px;
  z-index:2;
}

.toast[hidden] {
  display:none;
}

@media(max-width:1050px) {
  .shell {
    grid-template-columns:190px minmax(0,1fr);
  }
  .wrap,.topbar {
    padding-left:19px;
    padding-right:19px;
  }
  .research-layout {
    grid-template-columns:minmax(0,1fr) minmax(220px,28%);
  }
}

@media(max-width:790px) {
  .shell {
    display:block;
  }
  .sidebar {
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .sidebar-content {
    height:auto;
    position:static;
    padding:12px 16px;
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    gap:8px;
  }
  .sidebar section,.sidebar-foot {
    display:none;
  }
  .topbar {
    height:48px;
  }
  .wrap {
    padding:13px;
  }
  .hero {
    padding:17px;
  }
  .research-layout {
    grid-template-columns:1fr;
  }
  .research-sidebar {
    position:static;
    max-height:none;
    overflow:visible;
  }
  .tabs {
    gap:14px;
  }
  .hero p {
    font-size:13px;
  }
  .search {
    grid-template-columns:auto minmax(0,1fr);
  }
  .search .primary {
    grid-column:2;
    justify-self:end;
  }
}

@media(prefers-reduced-motion:no-preference) {
  button {
    transition:background-color .15s,color .15s;
  }
}

.login-shell {
  max-width:480px;
  margin:clamp(20px,12vh,100px) auto 0;
}

.login-shell .panel {
  padding:26px;
}

.login-shell h1 {
  margin:8px 0;
}

.login-form,
.notebook-picker {
  display:grid;
  gap:9px;
  margin-top:16px;
}

.login-form label {
  display:grid;
  gap:5px;
}

.login-form input,
.notebook-picker select {
  width:100%;
  padding:9px 11px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--ink);
}

.notebook-picker {
  max-width:340px;
  color:var(--muted);
  font-size:12px;
  font-weight:650;
}

.research-pickers,
.query-filter-fields {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));
  gap:10px;
}

.research-pickers:empty {
  display:none;
}

.query-filters {
  max-width:820px;
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
}

.query-filters summary {
  cursor:pointer;
  font-weight:650;
}

.query-filter-fields {
  margin-top:8px;
}

.query-filter-fields label {
  display:grid;
  gap:4px;
}

.query-filter-fields input {
  width:100%;
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:7px;
  color:var(--ink);
  background:var(--surface);
}
