/* ---------- Palette: warm yellow, orange, berry, cherry blossom ---------- */
:root {
  --rb-saffron: #f2b134;
  --rb-apricot: #e8743b;
  --rb-berry: #a8325e;
  --rb-cherry: #c94f7c;
  --rb-blossom: #f9d7e2;
  --rb-blossom-soft: #fdeef3;
  --rb-cream: #fffaf2;
  --rb-peach: #fff1e3;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--rb-berry);
  --md-primary-fg-color--light: var(--rb-cherry);
  --md-primary-fg-color--dark: #7d2245;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: var(--rb-apricot);
  --md-default-bg-color: var(--rb-cream);
  --md-default-fg-color: #3b2a2f;
  --md-typeset-a-color: var(--rb-cherry);
  --rb-heading: var(--rb-berry);
  --rb-subheading: #c25a24;
  --rb-table-head: var(--rb-blossom);
  --rb-table-stripe: var(--rb-peach);
  --rb-table-border: #f1d3c4;
  --rb-qty: #c25a24;
}

[data-md-color-scheme="slate"] {
  --md-hue: 335;
  --md-primary-fg-color: #8c2a50;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: var(--rb-saffron);
  --md-default-bg-color: #241a20;
  --md-typeset-a-color: #f4a6bd;
  --rb-heading: #f4a6bd;
  --rb-subheading: #f6b45a;
  --rb-table-head: #4a2333;
  --rb-table-stripe: #2d2128;
  --rb-table-border: #4a3540;
  --rb-qty: #f6b45a;
}

/* Header: sunrise gradient from saffron through apricot to berry */
.md-header,
.md-tabs {
  background: linear-gradient(100deg, var(--rb-saffron) 0%, var(--rb-apricot) 45%, var(--rb-berry) 100%);
}
[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-tabs {
  background: linear-gradient(100deg, #b5701c 0%, #a8462a 45%, #6e1f3f 100%);
}

/* Headings */
.md-typeset h1 {
  color: var(--rb-heading);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.md-typeset h2 {
  color: var(--rb-subheading);
  font-weight: 700;
  padding-bottom: 0.2em;
  border-bottom: 3px solid var(--rb-blossom);
}
[data-md-color-scheme="slate"] .md-typeset h2 {
  border-bottom-color: #4a2333;
}

/* ---------- Tiptopf-style three-column recipe tables ---------- */
.md-typeset table:not([class]) {
  display: table;
  width: 100%;
  font-size: 0.8rem;
  border: 1px solid var(--rb-table-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: none;
}
.md-typeset table:not([class]) th {
  background: var(--rb-table-head);
  color: var(--rb-heading);
  font-weight: 700;
}
.md-typeset table:not([class]) td {
  vertical-align: top;
  border-top: 1px solid var(--rb-table-border);
}
.md-typeset table:not([class]) tbody tr:nth-child(even) {
  background: var(--rb-table-stripe);
}
.md-typeset table:not([class]) tbody tr:hover {
  background: var(--rb-blossom-soft);
}
[data-md-color-scheme="slate"] .md-typeset table:not([class]) tbody tr:hover {
  background: #3a2430;
}
.md-typeset table:not([class]) th:nth-child(1),
.md-typeset table:not([class]) td:nth-child(1) {
  width: 15%;
  white-space: nowrap;
  font-weight: 700;
  color: var(--rb-qty);
}
.md-typeset table:not([class]) th:nth-child(1) {
  color: var(--rb-heading);
}
.md-typeset table:not([class]) th:nth-child(2),
.md-typeset table:not([class]) td:nth-child(2) {
  width: 28%;
}

/* Tags as soft blossom pills */
.md-typeset .md-tag {
  background: var(--rb-blossom);
  color: var(--rb-berry);
  font-weight: 700;
}
[data-md-color-scheme="slate"] .md-typeset .md-tag {
  background: #4a2333;
  color: #f4a6bd;
}

/* Bigger text on phones for cooking */
@media screen and (max-width: 600px) {
  .md-typeset { font-size: 0.9rem; }
  .md-typeset table:not([class]) { font-size: 0.85rem; }
  .md-typeset table:not([class]) th,
  .md-typeset table:not([class]) td { padding: 0.55em 0.5em; }
  .md-typeset table:not([class]) th:nth-child(1),
  .md-typeset table:not([class]) td:nth-child(1) { width: 18%; white-space: normal; }
  .md-typeset table:not([class]) th:nth-child(2),
  .md-typeset table:not([class]) td:nth-child(2) { width: 27%; }
}

/* ---------- Home page: browse row and recipe lists ---------- */
.rb-browse {
  margin: 1.2em 0 2em;
  padding: 1em 1.2em;
  border-radius: 14px;
  background: var(--rb-table-stripe);
  border: 1px solid var(--rb-table-border);
}
.rb-browse p { margin: 0.4em 0; line-height: 2.4; }
.rb-browse-label {
  font-weight: 700;
  color: var(--rb-heading);
  margin-right: 0.4em;
}
.md-typeset .md-button--primary {
  background: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
  border-radius: 999px;
}
.md-typeset a.rb-chip {
  display: inline-block;
  padding: 0.15em 0.8em;
  margin: 0 0.2em 0.1em 0;
  border-radius: 999px;
  background: var(--rb-blossom);
  color: var(--rb-berry);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.8;
}
.md-typeset a.rb-chip:hover { background: var(--md-accent-fg-color); color: #fff; }
[data-md-color-scheme="slate"] .md-typeset a.rb-chip { background: #4a2333; color: #f4a6bd; }
.md-typeset .rb-meta {
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset h1 + ul, .md-typeset h2 + ul { list-style: none; margin-left: 0; }
.md-typeset h1 + ul > li, .md-typeset h2 + ul > li { margin-left: 0; margin-bottom: 0.8em; }
