:root {
  --primary-blue: #4472C4;
  --primary-orange: #ED7D31;
  --border-color: #ccc;
  --highlight-green: #c2e4a0;
  --selected-green: #E1FADD;
  --text-gray: #818181;
  --hover-gray: #444;
  --transition-speed: 0.5s;
}

.link {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 1px;
}

.text {
  font-family: Calibri, sans-serif;
}

body {
  font-family: "Lato", sans-serif;
  margin: 0;
  padding: 0;
}

.tree-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: -2;
  transition: var(--transition-speed);
}

.contact-email {
  position: fixed;
  z-index: 6;
  right: 1rem;
  bottom: 0.8rem;
  margin: 0;
  border-radius: 999px;
  background: #fffffff0;
  box-shadow: 0 3px 10px #1720331a;
  color: #526777;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-style: normal;
  padding: 0.35rem 0.6rem;
}

.add_div {
  position: absolute;
  width: 120px;
  height: 30px;
  border-style: solid;
  border-width: 1px;
  padding: 2px 2px 0px 2px;
  margin-top: 3px;
}

.help_box {
  position: absolute;
  max-width: 500px;
  border-style: solid;
  border-width: 1px;
  padding: 2px 2px 0px 2px;
  margin: 3px;
}

.add_text {
  font-size: 13px;
  cursor: default;
  text-align: center;
  margin: 0;
  padding: 0;
  user-select: none;
}

.upbar {
  height: 0;
  left: 0;
  right: 100%;
  width: 100%;
  position: fixed;
  z-index: 1;
  top: 0;
  overflow-x: hidden;
  transition: var(--transition-speed);
  padding-left: 30px;
  border-bottom-style: solid;
  border-width: 1px;
  background-color: white;
}

.upbar a, .sidebar a {
  text-decoration: none;
  font-size: 25px;
  color: var(--text-gray);
  display: block;
  transition: 0.3s;
}

.upbar a:hover, .sidebar a:hover {
  color: var(--hover-gray);
}

.upbar .closeupbtn {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  font-size: 36px;
  margin-top: 0;
  cursor: default;
  user-select: none;
}

.openupbtn {
  font-size: 20px;
  cursor: default;
  background-color: white;
  color: black;
  padding: 0 20px;
  border-style: solid;
  border-top-style: none;
  border-width: 1px;
  user-select: none;
  height: 28px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.topupbtn {
  font-size: 16px;
  cursor: default;
  background-color: white;
  color: black;
  padding: 0 10px;
  border-style: solid;
  border-top-style: none;
  border-width: 1px;
  user-select: none;
  height: 28px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.helpbtn {
  font-size: 16px;
  cursor: default;
  background-color: var(--highlight-green);
  color: black;
  padding: 0 10px;
  border-style: solid;
  border-top-style: none;
  border-width: 1px;
  user-select: none;
  height: 28px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.openupbtn:hover {
  background-color: var(--hover-gray);
}

.topupbtn:hover {
  background-color: var(--highlight-green);
}

a.topupbtn {
  text-decoration: none;
}

#top_controls {
  position: fixed;
  top: 1px;
  left: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

#top_button_id { width: 96px; }
#fit_tree_button_id { width: 152px; }
#print_button_id { width: 140px; }
#flip_tree_button_id { width: 128px; }
#editor_button_id { width: 104px; }
#help_button_id { width: 58px; box-sizing: border-box; }

#up_open_button_div {
  position: static;
  transition: margin-top .5s;
  opacity: 1;
}

#top_button_div {
  position: static;
  transition: margin-top .5s;
  opacity: 1;
}

#fit_tree_button_div {
  position: static;
  transition: margin-top .5s;
  opacity: 1;
}

.tree-status {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  display: flex;
  min-width: 15rem;
  max-width: min(28rem, calc(100vw - 2rem));
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.35rem;
  transform: translate(-50%, -50%);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fffffff5;
  box-shadow: 0 12px 32px #0f172a1f;
  color: #334155;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  text-align: center;
}

.tree-status[hidden] {
  display: none;
}

#tree_retry_button {
  border: 1px solid #78b8aa;
  border-radius: 7px;
  background: #dff4ed;
  color: #0f5e55;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  padding: 0.45rem 0.8rem;
}

#print_button_div {
  position: static;
  transition: margin-top .5s;
  opacity: 1;
}

#editor_button_div {
  position: static;
  transition: margin-top .5s;
  opacity: 1;
}

#flip_tree_button_div {
  position: static;
  transition: margin-top .5s;
  opacity: 1;
}

#help_div {
  position: static;
  transition: margin-top .5s;
  opacity: 1;
}

#tree_view_div {
  display: flex;
  align-items: center;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

#tree_view_select {
  height: 100%;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #334155;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 650;
  outline: 0;
  cursor: pointer;
}

body {
  background: #eef4f5;
}

.tree-container {
  background:
    radial-gradient(circle at 18% 12%, #e1f4ef 0, transparent 28rem),
    radial-gradient(circle at 84% 78%, #e8efff 0, transparent 32rem),
    #f8fafc;
}

#top_controls {
  z-index: 2;
  align-items: center;
  gap: 6px;
  padding: 7px 26px 7px 10px;
  border: 1px solid #dbe4e8;
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 12px 0;
  background: #fffffff0;
  box-shadow: 0 4px 14px #17203314;
}

.topupbtn, .openupbtn, .helpbtn {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 650;
}

.topupbtn, .openupbtn {
  background-color: #fff;
  color: #334155;
}

.topupbtn:hover, .openupbtn:hover {
  border-color: #91c4b9;
  background-color: #e6f6f1;
  color: #0f5e55;
}

.helpbtn {
  border-color: #9ed2c7;
  background-color: #dff4ed;
  color: #0f5e55;
}

.sidebar {
  border-left-color: #d7e2e7;
  background: #fffffff7;
  box-shadow: -8px 0 28px #17203317;
}

.modern-tree .link {
  stroke: #a8c7c0;
  stroke-width: 1.25px;
  stroke-linecap: round;
}

.modern-tree .text {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.modern-tree .sidebar {
  box-sizing: border-box;
  min-width: 0;
  z-index: 5;
  border-left: 1px solid #c6e1da;
  border-radius: 14px 0 0 14px;
  background:
    linear-gradient(180deg, #f8fffd 0, #ffffff 9rem),
    #fff;
  box-shadow: -12px 0 36px #0f4c4530;
  color: #243447;
  padding: 0;
}

.modern-tree .sidebar.is-open {
  padding: 4.5rem 1.5rem 2rem;
}

.modern-tree .sidebar .closerightbtn {
  top: 0.7rem;
  right: 0.9rem;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #176f65;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}

.modern-tree .sidebar h2 {
  margin: 0 2.5rem 1.5rem 0;
  color: #173b36;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.modern-tree .sidebar p {
  color: #526777;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
}

.modern-tree .sidebar p b {
  color: #176f65;
}

#right_panel_sibling_text {
  overflow-x: hidden;
  white-space: nowrap;
}

#right_panel_documents {
  margin: 0 18px 28px;
  text-align: left;
}

#right_panel_documents h3 {
  margin: 0 0 14px;
  color: #1e293b;
  font-size: 1rem;
}

#right_panel_documents h4 {
  margin: 14px 0 8px;
  color: #526777;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

.document-thumbnails a {
  display: grid;
  min-width: 0;
  padding: 7px;
  border: 1px solid #d7e2e7;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  text-decoration: none;
  box-shadow: 0 3px 9px #17203312;
}

.document-thumbnails a:hover {
  border-color: #91c4b9;
  background: #f3fbf8;
}

.document-thumbnails img,
.pdf-thumbnail {
  display: grid;
  width: 100%;
  height: 82px;
  place-items: center;
  border-radius: 5px;
  object-fit: cover;
  background: #edf2f7;
}

.pdf-thumbnail {
  color: #b42318;
  font-size: 1rem;
}

.document-thumbnail-name {
  overflow: hidden;
  margin-top: 6px;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.openupbtn {
  min-width: 2.5rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 0 0 9px 9px;
  color: #176f65;
}

.panel-chevron {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.family-choice-list {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 100%;
  margin-left: 1.75rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.family-choice-button {
  flex: 0 0 auto;
  min-height: 1.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.3rem 0.7rem;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.family-choice-button:hover {
  border-color: #8dc7ba;
  background: #edf9f6;
  color: #0f5e55;
}

.family-choice-button[aria-pressed="true"] {
  border-color: #398f80;
  background: #d8f2eb;
  color: #0d5e54;
}

.modern-tree .upbar {
  border-bottom-color: #b9ddd5;
  background: #f8fffd;
  box-shadow: 0 5px 18px #0f4c4520;
}

.modern-tree .family-choice-button {
  border-color: #b9ddd5;
  background: #fff;
  color: #24574f;
}

.modern-tree .family-choice-button:hover,
.modern-tree .family-choice-button[aria-pressed="true"] {
  border-color: #278a7a;
  background: #d6f4ec;
  color: #0b5e53;
}

@media (max-width: 800px) {
  #top_controls {
    max-width: 100vw;
    flex-wrap: wrap;
    border-radius: 0 0 12px 0;
  }
}

.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 3;
  top: 0;
  right: 0px;
  overflow-y: auto;
  transition: var(--transition-speed);
  padding-top: 30px;
  border-left-style: solid;
  border-width: 1px;
  background-color: white;
}

.sidebar .closerightbtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
  cursor: default;
  user-select: none;
}
