:root {
  --ink: #1b1b1b;
  --muted: #5b5b5b;
  --gold: #9a7420;
  --gold-line: #d9c48a;
  --rule: #e6e0d0;
  --bg: #ffffff;
  --row-h: 96px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- masthead: logo + nav ---------- */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}
.logo-link { display: block; line-height: 0; }
.logo { display: block; height: auto; max-width: 100%; }

.nav {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 56px;
  margin-top: 8px;
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.04em;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 2px;
  display: inline-block;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"], .has-sub.current > a {
  color: var(--gold);
  border-bottom-color: var(--gold-line);
  outline: none;
}
.has-sub { position: relative; text-align: center; }
.sub {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 150px;
  display: none;
  flex-direction: column;
  align-items: center;
  background: #fff;
  padding: 6px 0 10px;
  z-index: 10;
}
.sub a { font-size: 19px; padding: 6px 18px; }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { display: flex; }

/* ---------- home: big centered logo ---------- */
body.home .masthead {
  flex: 1;
  justify-content: center;
  padding-bottom: 6vh;
}
body.home .logo { width: min(92vw, 1180px); }
body.home .content { display: none; }

/* ---------- inner pages ---------- */
body.inner .masthead { padding-top: 28px; }
body.inner .logo { width: min(80vw, 420px); }
body.inner .nav { margin-top: 4px; font-size: 20px; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 24px 72px; }
h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 42px;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  text-align: center;
}
.intro { text-align: center; color: var(--muted); margin: 0 0 28px; }
.prose { max-width: 720px; margin: 0 auto; }
.prose p { margin: 0 0 1.1em; font-size: 16.5px; }
.prose h1 { margin-bottom: 24px; }
address { font-style: normal; text-align: center; font-size: 18px; line-height: 1.9; }

/* ---------- catalog tables (every row identical) ---------- */
.table-wrap { overflow-x: auto; }
table.catalog {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
  border-collapse: collapse;
}
.c-series { width: 18%; }
.c-name   { width: 24%; }
.c-desc   { width: 42%; }
.c-link   { width: 16%; }
.catalog th {
  height: 44px;
  text-align: left;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 2px solid var(--gold-line);
}
.catalog td {
  height: var(--row-h);
  padding: 0 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.catalog tr { height: var(--row-h); }
.cell {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  line-height: 21px;
  max-height: 63px;
  font-size: 14px;
  color: var(--muted);
}
.cell.strong { color: var(--ink); font-weight: 600; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 150px;
  height: 44px;
  padding: 0 8px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--gold);
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
}
.btn:hover, .btn:focus-visible { background: var(--gold); color: #fff; outline: none; }
.btn.soon, .btn.soon:hover { color: var(--muted); border-color: var(--rule); background: #faf8f2; cursor: default; }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 16px 26px; }
body.home .foot { padding-top: 0; }

@media (max-width: 640px) {
  .nav { gap: 26px; font-size: 19px; }
  body.inner .nav { font-size: 18px; }
  h1 { font-size: 34px; }
}

/* ---------- books page: covers + language filter ---------- */
table.catalog.books { min-width: 1020px; }
.books .c-cover  { width: 7%; }
.books .c-series { width: 15%; }
.books .c-name   { width: 22%; }
.books .c-lang   { width: 9%; }
.books .c-desc   { width: 32%; }
.books .c-link   { width: 15%; }
.books td.cover-cell { padding: 0 8px 0 16px; text-align: center; }
.cover { display: block; height: 76px; width: auto; max-width: 100%; margin: 0 auto; border: 1px solid var(--rule); }
.cover.none { display: block; height: 76px; width: 51px; margin: 0 auto; border: 1px dashed var(--rule); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.catalog tr[hidden] { display: none; }
.lang-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip { font: inherit; font-size: 13px; font-weight: 600; color: var(--gold); background: #fff; border: 1px solid var(--gold-line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--gold); color: #fff; border-color: var(--gold); }
.chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
