/* ------------------------------------------------------------------
   The citation tree on "Impact of Bourgain's work": a dark figure in the
   white page, the globe on the left and what it shows in words on the right.
   Drawn by assets/impact-tree.js.
------------------------------------------------------------------ */

.tree-section { margin: 0 0 56px; }
.impact-h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 8px;
}
.tree-lede { max-width: var(--measure); margin: 0 0 18px; color: var(--ink-2); }

.it {
  --it-bg:     #0b0f17;
  --it-bg-2:   #151c2b;
  --it-ink:    #dfe5ee;
  --it-ink-2:  #9aa6b8;
  --it-ink-3:  #6b778a;
  --it-rule:   rgba(255, 255, 255, 0.09);
  --it-link:   #9cc0ff;
  --it-gold:   #ffc53d;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  height: 660px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--it-bg);
  color: var(--it-ink);
  box-shadow: 0 10px 30px rgba(11, 15, 23, 0.18);
  font-size: 14px;
  line-height: 1.45;
}

/* ---- the globe */
.it-stage {
  position: relative;
  min-width: 0;
  background: radial-gradient(ellipse at 50% 45%, var(--it-bg-2) 0%, var(--it-bg) 70%);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.it-canvas { display: block; width: 100%; height: 100%; cursor: grab; outline: none; }
.it-canvas.is-dragging { cursor: grabbing; }
.it-canvas.is-pointing { cursor: pointer; }

.it-crumbs {
  position: absolute;
  left: 14px;
  top: 12px;
  right: 190px;
  font-size: 13px;
  color: var(--it-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.it-crumbs button {
  font: inherit;
  color: var(--it-link);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.it-crumbs button:hover { text-decoration: underline; }
.it-crumbs .sep { margin: 0 6px; color: var(--it-ink-3); }
.it-crumbs .here { color: var(--it-ink); font-weight: 600; }

.it-tools { position: absolute; right: 12px; top: 10px; display: flex; gap: 6px; }
.it-tools button {
  font: inherit;
  font-size: 13px;
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
  color: var(--it-ink);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--it-rule);
  border-radius: 4px;
  cursor: pointer;
}
.it-tools button:hover { background: rgba(255, 255, 255, 0.14); }

.it-hint {
  position: absolute;
  left: 14px;
  bottom: 10px;
  margin: 0;
  font-size: 12px;
  color: var(--it-ink-3);
  pointer-events: none;
}
.it-axis {
  position: absolute;
  right: 14px;
  bottom: 10px;
  margin: 0;
  font-size: 12px;
  color: var(--it-ink-3);
  pointer-events: none;
}
.it-axis b { color: var(--it-gold); font-weight: 600; }

.it-tip {
  position: absolute;
  z-index: 2;
  max-width: 300px;
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(8, 11, 18, 0.94);
  border: 1px solid var(--it-rule);
  color: var(--it-ink);
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.it-tip .k { display: block; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--it-ink-3); margin-bottom: 2px; }
.it-tip .m { display: block; color: var(--it-ink-2); margin-top: 3px; }

/* ---- the words */
.it-panel {
  position: relative;
  border-left: 1px solid var(--it-rule);
  overflow-y: auto;
  padding: 14px 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.it-panel a { color: var(--it-link); }
.it-panel a:visited { color: #c3a8ff; }
.it-panel h3 { font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0 0 6px; color: #fff; }
.it-panel p { margin: 0 0 10px; }
.it-panel .it-k {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--it-ink-3);
  margin: 16px 0 6px;
}
.it-panel .it-meta { color: var(--it-ink-2); font-size: 13px; }
.it-panel .it-note { color: var(--it-ink-3); font-size: 12px; }

.it-search { position: relative; margin-bottom: 12px; }
.it-search input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  padding: 7px 10px;
  color: var(--it-ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--it-rule);
  border-radius: 4px;
  outline: none;
}
.it-search input:focus { border-color: rgba(156, 192, 255, 0.6); }
.it-search input::placeholder { color: var(--it-ink-3); }
.it-hits {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  background: #111723;
  border: 1px solid var(--it-rule);
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
}
.it-hits:empty { display: none; }

.it-list { list-style: none; margin: 0; padding: 0; }
.it-list li { margin: 0; }
.it-list button, .it-hits button {
  display: flex;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  color: var(--it-ink);
  background: none;
  border: 0;
  border-radius: 3px;
  padding: 5px 6px;
  cursor: pointer;
}
.it-list button:hover, .it-hits button:hover, .it-list button:focus-visible, .it-hits button:focus-visible,
.it-list li.is-on button { background: rgba(255, 255, 255, 0.08); outline: none; }
.it-list .t { flex: 1 1 auto; min-width: 0; }
.it-list .n, .it-hits .n { flex: none; color: var(--it-ink-3); font-variant-numeric: tabular-nums; }
.it-hits .t { flex: 1 1 auto; min-width: 0; }
.it-chip { flex: none; width: 9px; height: 9px; border-radius: 50%; transform: translateY(1px); }

.it-cites { list-style: none; margin: 0; padding: 0; }
.it-cites li {
  padding: 6px 6px 7px;
  border-radius: 3px;
  border-bottom: 1px solid var(--it-rule);
  font-size: 13px;
  line-height: 1.35;
  cursor: default;
}
.it-cites li:hover, .it-cites li.is-on { background: rgba(255, 197, 61, 0.09); }
.it-cites .w { display: block; color: var(--it-ink); }
.it-cites .a { display: block; color: var(--it-ink-2); font-size: 12px; margin-top: 2px; }
.it-more {
  font: inherit;
  font-size: 13px;
  margin-top: 10px;
  padding: 6px 10px;
  color: var(--it-ink);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--it-rule);
  border-radius: 4px;
  cursor: pointer;
}
.it-more:hover { background: rgba(255, 255, 255, 0.14); }

.it-big { font-size: 30px; font-weight: 600; line-height: 1.1; color: var(--it-gold); font-variant-numeric: tabular-nums; }
.it-fields { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.it-fields li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin-bottom: 5px; color: var(--it-ink-2); }
.it-fields .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.it-fields .bar i { display: block; height: 100%; background: var(--it-gold); }
.it-hist { display: block; width: 100%; height: 64px; }
.it-pick {
  margin: 0 0 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 197, 61, 0.35);
  border-radius: 5px;
  background: rgba(255, 197, 61, 0.06);
  font-size: 13px;
}
.it-pick .w { display: block; color: #fff; font-weight: 600; margin-bottom: 3px; }

@media (max-width: 900px) {
  .it { grid-template-columns: 1fr; grid-template-rows: 460px auto; height: auto; }
  .it-panel { border-left: 0; border-top: 1px solid var(--it-rule); max-height: 520px; }
  .it-crumbs { right: 150px; }
  /* below 16px, iOS zooms the whole page in when the field is tapped */
  .it-search input { font-size: 16px; }
}
@media (max-width: 640px) {
  .it { grid-template-rows: 400px auto; border-radius: 6px; }
  .it-hint { display: none; }
}
