:root {
  --bg: #faf6f0;
  --card: #fffdf9;
  --text: #2a241c;
  --muted: #5c5348;
  --accent: #8a4b2a;
  --line: #e6d8c8;
  --max: 40rem;
}

* { box-sizing: border-box; }

html {
  font-size: 20px;
  -webkit-text-size-adjust: 100%;
}

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

header, main, footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.15rem;
}

header {
  padding-bottom: 0.35rem;
}

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

h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  margin: 0.35rem 0 0.6rem;
}

h2 {
  font-size: 1.25rem;
  margin: 1.6rem 0 0.55rem;
}

p, li {
  font-size: 1rem;
}

.lede, .meta, .credit, .caption, .back, footer {
  color: var(--muted);
}

.back {
  display: inline-block;
  margin-bottom: 0.4rem;
  text-decoration: none;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.95rem;
}

.back:hover { text-decoration: underline; }

.hero {
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
  display: block;
}

.caption {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
}

.meta {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.95rem;
  margin: 0.4rem 0 1rem;
}

.credit {
  font-size: 0.95rem;
}

ul, ol {
  padding-left: 1.3rem;
  margin: 0.4rem 0 0;
}

li {
  margin: 0.45rem 0;
}

.tips {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.2rem 1rem 1rem;
  margin-top: 1.4rem;
}

.recipe-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.recipe-list li {
  margin: 0 0 1rem;
}

.recipe-list a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  overflow: hidden;
}

.recipe-list a.card:hover {
  border-color: var(--accent);
}

.recipe-list img {
  width: 100%;
  height: auto;
  display: block;
}

.recipe-list .card-body {
  padding: 0.85rem 1rem 1.05rem;
}

.recipe-list h2 {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
}

.recipe-list p {
  margin: 0;
  color: var(--muted);
}

footer {
  padding-top: 0.2rem;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.85rem;
}

h2.section-heading {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.15rem;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: 0.01em;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.6rem 0 0.8rem;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.95rem;
}

th, td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

th {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 600;
  background: #f3ebe1;
  font-size: 0.85rem;
  line-height: 1.3;
}

td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.3rem 0 1.1rem;
}

/* Home reference page */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 1.1rem;
  padding: 0;
}

.jump a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 9.5rem;
  min-height: 3rem;
  padding: 0.55rem 0.7rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 0.7rem;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

.jump a:hover,
.jump a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.search {
  margin: 0 0 0.4rem;
}

.search label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 1rem;
  color: var(--muted);
}

.search input {
  width: 100%;
  font-size: 1rem;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.4;
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 0.7rem;
  background: var(--card);
  color: var(--text);
}

.search input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.search-status {
  min-height: 1.4em;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 1rem;
}

.ref-section {
  scroll-margin-top: 0.8rem;
  margin-top: 1.6rem;
  padding-top: 0.2rem;
}

.ref-section > h2 {
  font-size: 1.45rem;
  margin: 0 0 0.55rem;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  margin: 0 0 0.7rem;
}

.link-list a {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.85rem 1rem;
}

.link-list a:hover,
.link-list a:focus-visible {
  border-color: var(--accent);
}

.link-title {
  display: block;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--accent);
  font-weight: 700;
}

.link-desc {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.empty {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-style: italic;
}
