:root {
  --ink: #000080;
  --link: #663333;
  --visited: #666666;
  --table-border: #777;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: #000;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  background: url("assets/CottonDreamBackground.gif") repeat;
  overflow-x: hidden;
}

.site-shell {
  display: grid;
  grid-template-columns: 152px 720px;
  width: 872px;
  max-width: 100%;
  min-height: 700px;
}

.navigation { padding-top: 178px; }

.navigation nav {
  width: 127px;
  margin-left: 25px;
  position: sticky;
  top: 0;
  border: 9px ridge #bcbcbc;
  background: #d4d4d4;
}

.navigation a { display: block; height: 27px; }
.navigation img { display: block; width: 109px; height: 27px; border: 0; }

.page-content { width: 720px; max-width: 100%; min-width: 0; }

.masthead {
  position: relative;
  width: 720px;
  max-width: 100%;
  aspect-ratio: 720 / 178;
}

.banner { position: absolute; top: 14.04%; left: 24.03%; width: 56.81%; height: auto; }
.sitar { position: absolute; top: 40.45%; left: 2.78%; width: 17.78%; height: auto; }
.tabla { position: absolute; top: 42.13%; left: 83.06%; width: 16.94%; height: auto; }

.raga-table {
  width: 589px;
  margin-left: 60px;
  border: 1px solid var(--table-border);
  border-collapse: separate;
  border-spacing: 1px;
  color: var(--ink);
}

.raga-table th,
.raga-table td {
  padding: 1px;
  text-align: left;
  vertical-align: top;
  font-weight: normal;
}

.raga-table .raga-detail th,
.raga-table .raga-detail td {
  padding-top: 3px;
  padding-bottom: 3px;
}

.raga-table .notation-detail th,
.raga-table .notation-detail td {
  padding-top: 5px;
  padding-bottom: 5px;
}

.raga-table th:not([colspan]) { width: 216px; }
.raga-table td { font-weight: bold; }
.raga-table .remarks th,
.raga-table .remarks td { font-weight: normal; }

.raga-table .remarks-label {
  display: inline-block;
  margin-bottom: 5px;
}

.raga-table .exercise-heading th,
.raga-table .exercise-heading td {
  padding-top: 9px;
}

.raga-table .exercises td {
  padding-top: 5px;
  padding-bottom: 6px;
  line-height: 1.8;
}

.secondary-table { margin-top: 8px; }
.raga-variant-title { margin: 28px 0 4px 60px; color: var(--ink); font-size: 1.15rem; }

.raga-notation,
[data-notation] {
  white-space: pre-wrap;
  letter-spacing: .01em;
}

.note {
  position: relative;
  display: inline-block;
  min-width: .55em;
  line-height: 1.25;
  text-align: center;
}

.note.komal {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .12em;
}

.note.tivra::before {
  content: "|";
  position: absolute;
  top: -.78em;
  left: 50%;
  font-size: .8em;
  font-weight: normal;
  line-height: 1;
  transform: translateX(-50%);
}

.note.lower-octave::after,
.note.upper-octave::after {
  position: absolute;
  left: 50%;
  font-size: 1em;
  font-weight: bold;
  line-height: 1;
  transform: translateX(-50%);
}

.note.lower-octave::after { content: "·"; bottom: -.6em; }
.note.double-lower-octave::after { content: "··"; bottom: -.6em; }
.note.upper-octave::after { content: "·"; top: -.64em; }

.raga-index {
  width: 589px;
  margin-left: 60px;
  color: var(--ink);
}

.raga-index h1 { margin: 0 0 4px; font-size: 1.3rem; }
.raga-index p { margin: 0 0 14px; }

.raga-index ul {
  columns: 3 150px;
  column-gap: 28px;
  margin: 0;
  padding-left: 20px;
}

.raga-index li { break-inside: avoid; margin-bottom: 4px; }
.raga-index a { color: var(--link); }
.raga-index a:visited { color: var(--visited); }

@media (max-width: 900px) {
  .site-shell { grid-template-columns: 1fr; width: 100%; }
  .navigation { padding: 16px 0 0; }
  .navigation nav { position: static; margin-left: 16px; }
  .page-content, .masthead { width: min(720px, 100vw); }
  .raga-table { width: calc(100% - 32px); margin: 0 16px 24px; }
  .raga-index { width: calc(100% - 32px); margin: 0 16px 24px; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .navigation { padding-top: 10px; }
  .navigation nav { margin-left: 10px; }
  .raga-table { width: calc(100% - 20px); margin: 0 10px 20px; }
  .raga-table th:not([colspan]) { width: 38%; }
  .raga-index { width: calc(100% - 20px); margin: 0 10px 20px; }
  .raga-index ul { columns: 1; padding-left: 18px; }
  .raga-variant-title { margin-left: 10px; }
}
