:root {
  --primary-font: 'Charis SIL', sans-serif;
  --header-font: 'Luckiest Guy', cursive;
  --subhead-font: 'Palanquin Dark', sans-serif;
  --primary-bg-color: #e0f7f4; /* Light teal from the icon */
  --primary-color: #333333;
  --header-color: #2b788c; /* Dark teal from the icon */
  --subhead-color: #1a5561; /* Darker teal */
  --accent-color: #6ec1a4; /* Light green from the icon */
  --border-color: #ccc;
  --border-thickness: 1px;
  --border-radius: 8px;
  --padding-standard: 15px;
  --max-width: 800px;
  --line-height: 1.6;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --gradient-bg: linear-gradient(135deg,  #e0f7f4, #f8f9fa);
}

@font-face {
  font-family: CharisSILW;
  src: url(fonts/CharisSIL-R.woff);
}

@font-face {
  font-family: CharisSILW;
  font-style: italic;
  src: url(fonts/CharisSIL-I.woff);
}

@font-face {
  font-family: CharisSILW;
  font-weight: bold;
  src: url(fonts/CharisSIL-B.woff);
}

@font-face {
  font-family: CharisSILW;
  font-weight: bold;
  font-style: italic;
  src: url(fonts/CharisSIL-BI.woff);
}

body {
  font-family: var(--primary-font);
  background: var(--gradient-bg);
  color: var(--primary-color);
  text-align: left;
  font-size: 1rem;
  line-height: var(--line-height);
  max-width: var(--max-width);
  margin: 2em auto;
  padding: var(--padding-standard);
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
}

header {
  text-align: center;
  margin-bottom: 2em;
}

.logo {
  max-width: 80px;
  height: auto;
  vertical-align: middle;
  margin-right: 10px;
}

div.page {
  background-color: white;
  padding: 1em;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

h1 {
  counter-reset: h2counter h3counter h4counter;
  font-family: var(--header-font);
  font-size: 3rem;
  color: var(--header-color);
  text-align: center;
  margin-bottom: 0.5em;
  display: flex;
  justify-content: center;
  align-items: center;
}

div.subhead {
  font-family: var(--primary-font);
  font-size: 1rem;
  color: var(--primary-color);
  text-align: center;
  margin-top: -1rem; /* Adjusted for better spacing */
}

h2 {
  font-family: var(--subhead-font);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: var(--primary-color);
  counter-increment: h2counter;
  counter-reset: h3counter h4counter;
}

h3 {
  font-family: var(--subhead-font);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: var(--primary-color);
  counter-increment: h3counter;
  counter-reset: h4counter;
}

h4 {
  font-family: var(--subhead-font);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: var(--primary-color);
  counter-increment: h4counter;
}

h2:before {
  content: counter(h2counter) ".\00a0\00a0";
  font-weight: normal;
  color: var(--accent-color);
}

h3:before {
  content: counter(h2counter) "." counter(h3counter) ".\00a0\00a0";
  font-weight: normal;
  color: var(--accent-color);
}

h4:before {
  content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) ".\00a0\00a0";
  font-weight: normal;
  color: var(--accent-color);
}

div.pron {
  margin-top: -1em;
}

div.ortho {
  margin-bottom: 0.5em;
  font-weight: bold;
}

table.chart {
  width: 100%;
  border: var(--border-thickness) solid black;
  border-collapse: collapse;
  margin-top: 1em;
}

th.chart {
    background-color: #e0f7f4;
  border: var(--border-thickness) solid var(--border-color);
  padding: 0.75rem 0;
}

td.chart {
  background-color: #e5efef;
  border: var(--border-thickness) solid var(--border-color);
  text-align: center;
  padding: 0.5rem;
}

div.dict {
  column-count: 3;
  column-gap: 20px;
  column-rule: var(--border-thickness) solid lightblue;
  margin-top: 1em;
}

ul.dict {
  list-style-type: none;
  padding-left: 1em;
  text-indent: -1em;
  margin: 0;
}

ul.dict li {
  break-inside: avoid;
}

.float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  text-align: center;
  box-shadow: 3px 3px 4px #999;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
}

.float:hover {
  background-color: #5da894;
  box-shadow: 3px 3px 6px #666;
}

@media print {
  body {
    background-color: white;
    padding: 0;
  }

  h1, h2, h3, h4, div.subhead {
    font-family: Palatino, serif;
  }

  table, table tr, table tr td, table tr th {
    page-break-inside: avoid;
  }
}
