/* Styles for the per-noun pages under /der-die-das/.
   Laid out like a dictionary entry: flat background, no cards, plain links. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a1814;
  --rule: #3a342c;
  --mark: #25211a;
  --text: #f0ebe3;
  --body: #d4cdc3;
  --muted: #9a9288;
  --der: #f08050;
  --die: #7eb0f0;
  --das: #6ecf90;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f3eb;
    --rule: #dcd2c0;
    --mark: #efe8da;
    --text: #1f1c17;
    --body: #3b362f;
    --muted: #6f685e;
    --der: #c45f1a;
    --die: #2970b8;
    --das: #2a8a4a;
  }
}

body {
  background: var(--bg);
  color: var(--body);
  font-family: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.page { max-width: 640px; margin: 0 auto; padding: 20px 24px 56px; }

a { color: var(--text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* Header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--rule);
}
.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.logo em { color: var(--muted); font-weight: 500; }
.top-link { font-size: 0.95rem; }

.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* The question is the page title; the answer below it is the big thing. */
h1 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 18px;
}

h1.title {
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.art { font-weight: 700; }
.art.der { color: var(--der); }
.art.die { color: var(--die); }
.art.das { color: var(--das); }

.sense { margin-bottom: 26px; }
.sense + .sense { padding-top: 24px; border-top: 1px solid var(--rule); }
.headword {
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.facts { display: grid; grid-template-columns: 5.5em 1fr; row-gap: 3px; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--text); }

p { margin-bottom: 14px; }
p strong { color: var(--text); font-weight: 700; }
.lead { margin-top: 4px; }
.note-box { color: var(--muted); }

h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 38px 0 8px;
  overflow-wrap: anywhere;
}

/* Example sentences */
.examples { list-style: none; }
.examples li { margin-bottom: 12px; padding-left: 14px; border-left: 2px solid var(--rule); }
.ex-de { display: block; color: var(--text); }
.ex-en { display: block; color: var(--muted); font-size: 0.93rem; }

/* Case table */
.table-wrap { overflow-x: auto; }
.cases { border-collapse: collapse; font-size: 0.95rem; width: 100%; min-width: 430px; }
.cases th, .cases td {
  text-align: left;
  padding: 6px 12px 6px 8px;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
.cases thead th { font-size: 0.85rem; border-bottom-color: var(--muted); }
.cases tbody th { padding-left: 0; }
.cases .on { background: var(--mark); color: var(--text); }
.cases tbody .on { font-weight: 700; }
.cases .indef { font-weight: 400; color: var(--muted); }

/* Link to the trainer */
.practice { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--rule); }
.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 4px;
}
.btn:hover { opacity: 0.85; }

/* Word lists (related nouns and the A–Z index) */
.wordlist { list-style: none; columns: 3; column-gap: 24px; }
.wordlist li { break-inside: avoid; padding: 2px 0; overflow-wrap: anywhere; }
.wordlist a { text-decoration: none; }
.wordlist a:hover { text-decoration: underline; }

.letters { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 24px; }
.letters a { padding: 3px 0; }

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}
.footer a { color: var(--muted); }

@media (max-width: 540px) {
  body { font-size: 16px; }
  .page { padding-left: 18px; padding-right: 18px; }
  .wordlist { columns: 2; }
}
