:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: #243d36;
  background: #f7f8f3;
  font-synthesis: none;
  --green: #174e45;
  --line: #e0e5da;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  border-radius: 9px;
  padding: 9px 13px;
}
button:hover {
  background: #eef2e9;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #96b6a3;
  outline-offset: 3px;
}
.primary,
.play {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover,
.play:hover {
  background: #286354;
}
header {
  height: 84px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand {
  text-decoration: none;
  color: var(--green);
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -1px;
}
.tagline {
  font-size: 13px;
  color: #78857b;
}
header .primary {
  margin-left: auto;
}
.layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: calc(100vh - 84px);
}
aside {
  border-right: 1px solid var(--line);
  padding: 28px 20px 160px;
  background: #f0f3eb;
}
.aside-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
h2 {
  font-size: 18px;
}
.aside-title span {
  background: #e1e8da;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 12px;
}
input:not([type="range"], [type="checkbox"]),
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: inherit;
}
#search {
  font-size: 13px;
  margin: 12px 0;
}
#library {
  display: grid;
  gap: 5px;
}
.library-item {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 14px 12px;
}
.library-item.selected {
  background: #dce8d9;
}
.library-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-item small {
  display: block;
  margin-top: 5px;
  color: #778476;
}
.aside-note {
  margin-top: 36px;
  font-size: 12px;
  line-height: 1.7;
  color: #798679;
}
main {
  padding: 54px max(30px, 6vw) 160px;
  min-width: 0;
}
#empty {
  padding: 6vh 0;
  max-width: 760px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: #84916f;
  font-weight: 700;
}
h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(34px, 4.5vw, 64px);
  line-height: 1.1;
  letter-spacing: -1.8px;
  margin: 22px 0;
}
#empty p {
  font-size: 18px;
  color: #7c897c;
  line-height: 1.8;
  margin: 26px 0;
}
.features {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 50px;
  font-size: 13px;
  color: #7b897a;
}
.document-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.danger {
  color: #994d40;
}
#reader h1 {
  font-size: clamp(30px, 4vw, 48px);
}
.reading-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #88907f;
  margin: 26px 0;
}
article {
  font-family: Georgia, serif;
  font-size: 21px;
  line-height: 1.8;
  max-width: 860px;
  overflow-wrap: anywhere;
}
.chunk {
  margin: 0 0 18px;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.chunk.current {
  background: #e6eedc;
  border-left-color: #668656;
}
.chunk:hover {
  background: #edf1e5;
}
.pages {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}
#message {
  position: fixed;
  bottom: 122px;
  left: 50%;
  transform: translateX(-50%);
  background: #243d36;
  color: white;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  max-width: 90vw;
  display: none;
  z-index: 5;
}
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 106px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 30px;
  box-shadow: 0 -8px 25px #253c3605;
}
.transport {
  display: flex;
  gap: 6px;
  align-items: center;
}
.transport button {
  border: 0;
  font-size: 20px;
}
.transport .play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 22px;
}
.progress {
  flex: 1;
  min-width: 90px;
}
.progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 8px;
}
#playing-title {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#progress-label {
  color: #8b9388;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #687668;
}
select {
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 7px;
  background: white;
  max-width: 190px;
  color: #243d36;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  max-width: 680px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 80px #152d3330;
}
dialog::backdrop {
  background: #172f3655;
}
dialog form {
  display: grid;
  gap: 18px;
}
.dialog-head,
.dialog-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 24px;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tabs button.active {
  background: #e1ecda;
  border-color: #94ab86;
}
.hint {
  font-size: 12px;
  line-height: 1.6;
  color: #84907f;
}
.drop {
  padding: 30px;
  background: #f2f5ed;
  border: 1px dashed #b2bea8;
  border-radius: 9px;
}
.device-option {
  display: flex;
  align-items: center;
  font-size: 11px;
}
#tab-dictate {
  display: grid;
  gap: 15px;
}
[hidden] {
  display: none !important;
}
#login-dialog {
  max-width: 420px;
}
#login-error {
  color: #a34534;
}
@media (max-width: 850px) {
  header {
    padding: 0 18px;
    height: 72px;
    gap: 12px;
  }
  .brand {
    font-size: 25px;
  }
  .tagline {
    display: none;
  }
  .layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  aside {
    padding: 20px 12px 180px;
  }
  main {
    padding: 32px 22px 180px;
  }
  footer {
    gap: 10px;
    padding: 12px;
    flex-wrap: wrap;
  }
  footer .progress {
    flex-basis: calc(100% - 150px);
  }
  footer label {
    flex: 1;
    min-width: 0;
  }
  footer select {
    max-width: 100%;
    width: 100%;
  }
  .dialog-foot {
    flex-wrap: wrap;
  }
}
@media (max-width: 560px) {
  .layout {
    display: block;
  }
  aside {
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .aside-title,
  .aside-note {
    display: none;
  }
  #search {
    margin: 0 0 8px;
  }
  #library {
    display: flex;
    overflow-x: auto;
    max-height: 84px;
  }
  .library-item {
    min-width: 150px;
    max-width: 190px;
  }
  main {
    padding: 28px 18px 190px;
  }
  #empty {
    padding: 20px 0;
  }
  article {
    font-size: 19px;
  }
  header .primary {
    font-size: 12px;
    padding: 9px;
  }
  #logout {
    font-size: 11px;
  }
  .reading-info {
    flex-direction: column;
  }
  footer {
    min-height: 148px;
  }
  #message {
    bottom: 165px;
  }
  .document-top .eyebrow {
    letter-spacing: 1px;
  }
  .document-top button {
    font-size: 11px;
    padding: 7px;
  }
  .features {
    gap: 15px;
    margin-top: 30px;
  }
  dialog {
    padding: 20px;
  }
}
