/* WEB PANEL PROXY public CSS */
:root {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #000000;
  --line: #000000;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 3px;
}

.page {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ШАПКА */

header {
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: .04em;
}

.subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.counter {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

/* ОСНОВНАЯ ЦИТАТА */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 55px 0;
}

.label {
  font-family: Arial, sans-serif;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 34px;
}

.quote {
  font-size: clamp(27px, 5vw, 43px);
  line-height: 1.45;
  font-weight: normal;
  letter-spacing: -.02em;
  margin: 0;
  white-space: pre-line;
}

.quote::before {
  content: "«";
  color: var(--muted);
}

.quote::after {
  content: "»";
  color: var(--muted);
}

.author {
  margin-top: 38px;
  font-size: 18px;
  font-weight: bold;
}

.author::before {
  content: "— ";
}

.work {
  margin-top: 9px;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* НАВИГАЦИЯ */

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

.btn {
  min-height: 48px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  font-size: 14px;
  transition: none;
}

.btn:hover {
  background: #000000;
  color: #ffffff;
}

.btn.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn.primary:hover {
  background: #000000;
}

.btn:disabled {
  opacity: 1;
  cursor: default;
}

/* НИЖНЯЯ ПАНЕЛЬ */

footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--muted);
}

footer button {
  background: none;
  border: none;
  text-decoration: underline;
  color: var(--muted);
  padding: 5px 0;
}

/* СПИСОК ЦИТАТ */

.list {
  display: none;
  padding: 20px 0 40px;
}

.list.open {
  display: block;
}

.list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.list-item:hover {
  background: #000000;
  color: #ffffff;
}

.list-item .smallquote {
  font-size: 18px;
  line-height: 1.5;
}

.list-item .smallauthor {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.list-item .smallauthor::before {
  content: "— ";
}

@media (max-width: 520px) {
  header {
    align-items: flex-start;
  }

  .logo {
    font-size: 16px;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .controls .primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  main {
    padding: 40px 0;
  }

  .quote {
    line-height: 1.4;
  }

  .author {
    margin-top: 28px;
  }
}