:root {
  color-scheme: light;
  --ink: #241f1a;
  --muted: #6b6258;
  --paper: #f7f1e6;
  --panel: #fffdf8;
  --rule: #c7b28a;
  --olive: #526b52;
  --blue: #244e63;
  --brick: #8e4d3d;
  --gold: #b38b39;
  --shadow: rgba(36, 31, 26, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

a {
  color: var(--blue);
}

.site-header {
  align-items: center;
  background: #fffaf0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px);
}

.brand {
  color: var(--ink);
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header p {
  color: var(--muted);
  margin: 2px 0 0;
}

.site-header nav {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.site-header nav a,
.button-link,
.entry-nav a,
.entry-nav span {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 7px 11px;
  text-decoration: none;
}

.site-header nav a.active,
.site-header nav a:hover,
.button-link:hover,
.entry-nav a:hover {
  background: var(--olive);
  color: white;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px clamp(16px, 4vw, 42px) 64px;
}

.intro-panel {
  align-items: end;
  background: linear-gradient(135deg, #fffaf0 0%, #f0e1bf 56%, #d8e1d1 100%);
  border-bottom: 5px solid var(--blue);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  min-height: 360px;
  padding: clamp(28px, 5vw, 58px);
}

.subhead {
  border-bottom: 3px solid var(--brick);
  margin-bottom: 24px;
  padding-bottom: 18px;
}

.kicker {
  color: var(--brick);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1.02;
  margin: 0 0 16px;
}

h2 {
  color: var(--blue);
  margin-top: 0;
}

h3 {
  color: var(--brick);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin: 18px 0 6px;
  text-transform: uppercase;
}

.status-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.status-grid div,
.source-list article,
.text-panel,
.entry-card a,
.image-pending,
.proverb-image {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 10px 22px var(--shadow);
}

.status-grid div {
  padding: 14px;
}

.status-grid dt {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.status-grid dd {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 4px 0 0;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.centuria-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.centuria-links a {
  background: #edf1e6;
  border: 1px solid #a9b58e;
  border-radius: 999px;
  padding: 6px 10px;
  text-decoration: none;
}

.filter-label {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

input[type="search"] {
  border: 1px solid var(--rule);
  border-radius: 6px;
  font: inherit;
  min-width: min(52vw, 320px);
  padding: 8px 10px;
}

.entry-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.entry-card a {
  color: var(--ink);
  display: grid;
  gap: 8px;
  min-height: 190px;
  padding: 16px;
  text-decoration: none;
}

.entry-card a:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.entry-id {
  color: var(--gold);
  font-weight: 700;
}

.entry-card strong {
  font-size: 1.1rem;
  line-height: 1.25;
}

.entry-card span {
  color: var(--muted);
}

.entry-card em {
  align-self: end;
  color: var(--olive);
  font-size: 0.9rem;
}

.entry-main {
  max-width: 1240px;
}

.entry-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.entry-nav .disabled {
  color: #a8a099;
}

.entry-detail h1 {
  max-width: 980px;
}

.entry-note,
.urn {
  color: var(--muted);
}

.proverb-image {
  margin: 24px 0;
  overflow: hidden;
}

.proverb-image img {
  display: block;
  height: auto;
  width: 100%;
}

.image-pending {
  align-items: center;
  background: repeating-linear-gradient(135deg, #fffdf8, #fffdf8 18px, #f1e8d6 18px, #f1e8d6 36px);
  color: var(--muted);
  display: flex;
  font-weight: 700;
  justify-content: center;
  margin: 24px 0;
  min-height: 260px;
}

.paired-text {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.text-panel {
  padding: 22px;
}

.greek-panel {
  font-size: 1.08rem;
}

.proverb-block p {
  font-size: 1.24rem;
  font-weight: 700;
}

.source-list {
  display: grid;
  gap: 18px;
}

.source-list article {
  padding: 22px;
}

code {
  background: #efe5d1;
  border-radius: 4px;
  padding: 1px 4px;
}

@media (max-width: 760px) {
  .site-header,
  .toolbar,
  .entry-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .intro-panel,
  .paired-text,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .site-header nav,
  .entry-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  input[type="search"] {
    min-width: 0;
    width: 100%;
  }
}
