:root {
  --orange_light:      #f6b26b;
  --orange_medium:     #e69138;
  --orange_dark:       #b45f06;
  --turquoise_light:   #76a5af;
  --turquoise_medium:  #45818e;
  --turquoise_dark:    #134f5c;
  --burgundy_light:    #c27ba0;
  --burgundy_medium:   #a64d79;
  --burgundy_dark:     #741b47;

  --mossgreen_light  : #b8c99a;
  --mossgreen_medium : #88a85d;
  --mossgreen_dark   : #5b7832;
  --red_light        : #e0a298;
  --red_medium       : #ca5e4d;
  --red_dark         : #9b3329;
  --coral_light      : #d6c3b0;
  --coral_medium     : #aa8f76;
  --coral_dark       : #6b533c;
  --steelblue_light  : #869dc4;
  --steelblue_medium : #3e6192;
  --steelblue_dark   : #263c61;
  --dustyplum_light  : #c28b85;
  --dustyplum_medium : #8b524e;
  --dustyplum_dark   : #5f3738;
  --yellow_light     : #f0d974;
  --yellow_medium    : #e6c12e;
  --yellow_dark      : #b8912b;
  --plum_light       : #9e91c4;
  --plum_medium      : #6f58aa;
  --plum_dark        : #432f76;

  --henyey :           #fee28e;
  --hayashi :          #ee7416;
  --forever_young  :   #b64203;
  --longevity_light :   #b6e192;
  --longevity_medium : #3ba358;
  --longevity_dark  :  #006034;

  --Vela:              #f6bc6b;
  --Monogem:           #e69138;
  --Geminga:           #b45f06;
  --Pulsar:            #76204a;
  --one_zone:          #d8f1eb;
  --two_zone_light:    #3fbc9d;
  --two_zone_medium:   #2c836d;
  --two_zone_dark:     #194b3e;
  --extrapolated:      #87d7df;
  --background_bar:    #eeeeee;

  --S2_1            :  #d9eeee;
  --S2_2            :  #bfe2e2;
  --S2_3            :  #a6d7d8;
  --S2              :  #008a8b;
  --S62_1           :  #d8d9ed;
  --S62_2           :  #bfbfe2;
  --S62_3           :  #a6a6d7;
  --S62             :  #00048b;
  --S4711_1         :  #ecd9ec;
  --S4711_2         :  #dfbfdf;
  --S4711_3         :  #d2a6d4;
  --S4711           :  #800080;
  --S4714_1         :  #fadce2;
  --S4714_2         :  #f6c4ce;
  --S4714_3         :  #f3adbb;
  --S4714           :  #db143b;
  --S1_1            :  #ffe2bf;
  --S1_2            :  #ffd199;
  --S1              :  #ff8c00;
}

/* Body styling */
body {
    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    margin: 0;
    padding: 0;
    background: #1f1b16;
    color: #f2efea;
}


.dark-light-mode {
    background-color: #f2efea;
    color: #1f1b16;
}

.mode-button {
    font-family: inherit;
    display: inline-block;
    padding: 10px 15px;
    margin: 10px;
    background-color: #c5c1bc;
    color: #1f1b16;
    text-decoration: none;
    border-radius: 15px;
    transition-duration: 0.4s;
    width: 140px;
    position: absolute;
    /* top: 80px; */
    top: 10px;
    right: 30px;
    border: 2px solid #37322c;
    /* transition: background-color 0.3s, border-color 0.3s, color 0.3s; */
}

/* Hover dark */
.mode-button:hover {
  color: #1f1b16;
  background-color: #f2efea;
  border: 2px solid #37322c;
}

/* Light mode */
.dark-light-mode .mode-button {
  color: #f2efea;
  background-color: #3f3a34;
  border: 2px solid #c5c1bc;
}

/* Hover light */
.dark-light-mode .mode-button:hover {
  color: #f2efea;
  background-color: #1f1b16;
}

/* Light mode */
.dark-light-mode .sidebar {
  background-color:#f2efea;
  color: black;
}

.clear-button {
    position: static;
    width: 160px;
    margin-right: 0;
    margin-left: 0;
    margin-top: 5px;
    margin-bottom: 5px;
}

.chart-button {
    position: static;
    width: auto;
    margin-right: 0;
    margin-left: 0;
    margin-top: 5px;
    margin-bottom: 5px;
}

.button-row {
    margin-top: auto;         /* push BOTH buttons to bottom */
    display: flex;
    gap: 10px;                /* space between buttons */
    padding: 0 0px 0px 0px;
    justify-content: space-between;
}


.palette-compare {
  display: flex;
  gap: 0px;
  margin-bottom: 10px;
  margin-top: 10px;
}


.color-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.color-label {
  min-width: 60px;
}

.color-box {
  width: 35px;
  height: 35px;
  cursor: pointer;
  border: none; /* 2px solid black; */
  margin-bottom: 5px;
  border-radius: 5px;
}

.picker-button {
    width: auto;
}

.preview-box {
    width: 35px;
    height: 35px;
    cursor: pointer;
    min-width: 35px;
    min-height: 35px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 0px;
    margin-left: 20px;
    margin-right: 20px;
    vertical-align: middle;
    background: #878079;
}

.color-picker-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.color-info {
    margin-top: 5px;
    display: flex;
    gap: 10px;
    line-height: 1.5;
    text-align: center;
}

.target-item {
    width: 20%;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
}

.target-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #878079;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
    position: relative;
    transition: outline 0.2s ease;
    cursor: grab;
}

.target-clear {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border: 1px solid #1f1b16;
    background: #f2efea;
    color: black;
    border-radius: 50%;
    padding: 0;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.target-box.active:hover .target-clear {
    opacity: 0.6;
    pointer-events: auto;
}

.target-box:hover {
    outline: 2px solid #444444;
    transition: transform 0.3s ease;
}

.dark-light-mode .target-box:hover {
  outline: 2px solid #c5c1bc;
}

.selected-source {
    outline: 2px solid #f2efea;
    border-radius: 10px;
}

.dark-light-mode .selected-source {
    outline: 2px solid #1f1b16;
    border-radius: 10px;
}

.dark-light-mode .chart-canvas {
    background-color: white;
}


[id] {
  scroll-margin-top: 100px; /* height of your header */
}

.toc {
    border: 2px solid #37322c;
    border-radius: 5px;
}

.toc ul {
    list-style: none;
    padding: 5px;
    margin: 0;
}

.toc li {
    margin-top: 4px;
    margin-bottom: 4px;
}

.toc a {
    text-decoration: none;
    color: inherit;
    font-family: Menlo, monospace;
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
}

.toc a:hover {
    background-color: #37322c;
}

.dark-light-mode .toc a:hover {
    background-color: #c5c1bc;
}

table {
    margin: 15px;
    margin-left: auto;
    margin-right: auto;
    padding:5px;
    border: 2px solid #37322c;
    border-radius: 5px;
}

table td:nth-child(5) { text-align: center; }

th, td {
    padding-right: 20px;
}

/* page layout things */
.page-layout {
    display: flex;
    height: calc(100vh - 80px); /* subtract your header height */
    overflow: hidden;
}

.main-content {
    width: 60%;
    margin-right: 40%;
    box-sizing: border-box;
    padding-left: 5%;
    padding-right: 5%;
    overflow-y: auto;
    flex: 1;
    padding-top: 20px;
}

.sidebar {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 40%;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #1f1b16;
    overflow-x: hidden;
    border-left: 3px solid #37322c;
    box-sizing: border-box;
    height: 100vh;
    padding-bottom: 80px;
    padding-top: 90px;
}

h1 {
    margin-top: 50px;
    font-size: 16px;
    font-weight: bold;
    overflow: visible;
}

.links-to-papers {
    color: inherit;
    position: relative;
}

.links-to-papers:hover {
    color: white;
}

.dark-light-mode .links-to-papers {
    color: inherit;
}

.dark-light-mode .links-to-papers:hover {
    color: #3f3a34;
}

/* .links-to-papers::after {
    position: fixed;
    top: var(--tooltip-top);
    left: var(--tooltip-left);
    transform: none;
    content: '';
    width: 200px;
    height: 150px;
    background-image: var(--tooltip-img);
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 200;
}

.links-to-papers:hover::after {
    opacity: 1;
} */

#link-tooltip {
    position: fixed;
    max-width: 300px;      /* cap the maximum size */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 200;
    overflow: hidden;
}

#link-tooltip img {
    display: block;
    width: 100%;
    height: auto;
}

.link-to-main {
    color: inherit;
}

.link-to-main:hover {
    color: white;
}

.dark-light-mode .link-to-main {
    color: inherit;
}

.dark-light-mode .link-to-main:hover {
    color: #3f3a34;
}

.palette-memory {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 4px;
}

.memory-box {
  width: 1.2%;
  min-width: 17px;
  aspect-ratio: 1 / 1;
  background: transparent;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  position: relative;
  box-sizing: border-box;
}

.memory-box.active:hover {
    transition: transform 0.3s ease;
    outline: 2px solid #444444;
    cursor: pointer;
}

.dark-light-mode .memory-box.active:hover {
    outline: 2px solid #c5c1bc;
}

.memory-box::after {
    content: attr(data-hex);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #37322c;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.memory-box.active:hover::after {
    opacity: 1;
}


header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 5px 10px;
  width: 100%;
  background-color: inherit;
  border-bottom: 3px solid #37322c;
  min-height: 80px;
  box-sizing: border-box;
}

.header-left {
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 10px;
  cursor: pointer;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 36px;
  padding-top: 0;
  margin-bottom: 0;
}


footer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0px;
    padding-bottom: 30px;
    padding-top: 0px;
    height: 30px;
    background-color: inherit;
    color: inherit;
    clear: both;
    position: relative;
    font-family: inherit;
    font-size: 12px;
    border-top: 3px solid #37322c;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

#colorPicker {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.pcr-button {
    display: none;
}

.pcr-app {
    position: relative !important;
    z-index: 1 !important;
    margin: 10px !important;
    padding: 4px !important;
}

.tooltip-pickr{
  position: relative;
  display: inline-block;
  border-bottom: 1.5px dotted;
  cursor: pointer;
}

.tooltip-pickr-text {
  visibility: hidden;
  width: auto;
  bottom: 100%;
  left: 65%;
  margin-left: -65px;
  color: #1f1b16;
  background-color: #f2efea;
  text-align: center;
  border-radius: 6px;
  padding: 5px 8px;
  position: absolute;
  z-index: 1;
}

.tooltip-pickr:hover .tooltip-pickr-text {
  visibility: visible;
}

.dark-light-mode .tooltip-pickr-text {
  color: #f2efea;
  background-color: #3f3a34;
}
