.rc-page {
  --rc-rule: #e6e1dc;
  --rc-space: clamp(1.5rem, 3.5vw, 3.25rem);
  padding-bottom: 1rem;
}
.rc-page .intro { margin: 0; max-width: 49ch; }
.rc-list-head {
  display: grid;
  grid-template-columns: minmax(9rem,.8fr) minmax(0,1.2fr);
  gap: 1.25rem var(--rc-space);
  align-items: center;
  padding: var(--rc-space);
}
.rc-list-head h1, .rc-detail-head h1 { margin: 0; }
.rc-library { margin-block: var(--rc-space); }
.rc-search {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 2.2fr) minmax(12rem, 1fr);
  gap: .85rem 1rem;
  max-width: 53rem;
}
.rc-count { margin: 1.55rem 0 .9rem; }
#rc-results { gap: clamp(1rem, 2.25vw, 2rem); align-items: stretch; }
.rc-page .rc-result {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: clamp(.55rem,1vw,.8rem);
  background: white;
  border: 1px solid var(--rc-rule);
  border-radius: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.rc-result:hover { border-color: #afa6c3; box-shadow: 0 6px 18px rgb(46 35 96 / .06); }
.rc-result-copy {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1rem,1.9vw,1.65rem) clamp(.65rem,1.35vw,1.2rem) .85rem;
}
.rc-page .rc-result h2 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.5rem,2.5vw,2.15rem);
  line-height: 1.14;
  text-wrap: balance;
}
.rc-result p {
  margin: .7rem 0 0;
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.55;
}
.rc-page .rc-result .detail-link {
  display: inline-block;
  padding-top: 1.2rem;
  margin-top: auto;
  text-decoration: underline;
  text-decoration-color: #aaa0bf;
  text-underline-offset: .27em;
  text-decoration-thickness: 1px;
}
.rc-result:hover .detail-link { text-decoration-color: currentColor; }
.rc-tile {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  row-gap: .25rem;
  padding: .55rem .75rem .6rem;
  width: 100%;
  min-width: 0;
  aspect-ratio: 2.8;
  min-height: 8.75rem;
  max-height: 13.75rem;
  background: #f6ecd6;
  border-radius: .9rem;
}
.rc-stage {
  display: grid;
  place-items: center;
  width: min(65%, 13.6rem);
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.rc-cake-art {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 11rem;
  max-height: 10.5rem;
}
.rc-size {
  justify-self: end;
  align-self: end;
  grid-row: 2;
  padding: .23rem .58rem;
  border-radius: 2rem;
  color: #483c40;
  background: #fffafa;
  font-size: .81rem;
  font-weight: 600;
  white-space: nowrap;
}
.rc-tile-berry { background: #f4e8ea; }
/* The diagram shows the cocoa sponge, fruit cream and chocolate ganache. */
.rc-berry-layers {
  display: flex;
  flex-direction: column;
  width: min(78%,8.5rem);
  transform: skewY(-5deg);
  padding-bottom: 1px;
}
.rc-berry-layers i {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(.7rem,1vw,.92rem);
  background: #65433c;
  border-inline-end: 1rem solid #513335;
  border-bottom: 1px solid rgb(61 35 43 / .14);
}
.rc-berry-layers i:first-child {
  height: .6rem;
  background: #483031;
  border-inline-end-color: #3e282b;
  border-radius: 3px 3px 0 0;
}
.rc-berry-layers i:nth-child(3), .rc-berry-layers i:nth-child(5) {
  height: clamp(.8rem,1.25vw,1.05rem);
  background: radial-gradient(ellipse 8px 5px at 17% 48%,#936078 85%,transparent 99%),
              radial-gradient(ellipse 10px 7px at 56% 85%,#b36067 85%,transparent 99%),
              radial-gradient(ellipse 7px 5px at 84% 38%,#90758a 85%,transparent 99%),#f8e5ce;
  border-inline-end-color: #e3c7b9;
}
.rc-detail-head {
  display: grid;
  grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr);
  align-items: center;
  gap: var(--rc-space);
  padding: clamp(1.2rem,2.5vw,2rem);
  background: #faf6ef;
}
.rc-detail-head:has(.rc-tile-berry) { background: #faf5f5; }
.rc-detail-head .rc-tile {
  min-height: 11rem;
  aspect-ratio: 1.85;
  max-height: 15rem;
}
.rc-detail-head h1 {
  max-width: 20ch;
  font-size: clamp(2rem,3.8vw,3.35rem);
  line-height: 1.07;
  text-wrap: balance;
}
.rc-detail-head .intro { margin-top: .85rem; font-size: 1rem; }
.rc-locked, .rc-download, .rc-support, .rc-pair {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
}
.rc-locked { margin-block: var(--rc-space); }
.rc-locked > div, .rc-download > div:first-child { flex: 1 1 21rem; }
.rc-locked h2, .rc-support h2, .rc-pair h2, .rc-download h3 { margin: 0; }
.rc-locked p:not(.eyeline), .rc-download p { margin: .55rem 0 0; color: var(--muted); }
.rc-support, .rc-pair {
  border-top: 1px solid var(--rc-rule);
  gap: 1rem 2rem;
  margin: var(--rc-space) 0 0;
  padding-top: var(--rc-space);
}
.rc-support h2, .rc-pair h2 { font-size: clamp(1.45rem,2.4vw,2.1rem); }
.rc-empty { grid-column: 1 / -1; }
.rc-empty h2 { font-size: 1.5rem; }

.rc-view-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  margin: var(--rc-space) 0 1.5rem;
  padding: .25rem;
  gap: .125rem;
  background: #f3f1f4;
  border-radius: 1rem;
}
.rc-view-tabs a {
  min-height: 2.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 0;
  border-radius: .8rem;
  background: transparent;
  padding: .5rem 1rem;
  font-size: .94rem;
}
.rc-view-tabs a[aria-current] { background: white; color: var(--purple); box-shadow: 0 1px 5px #2e23601c; }
.rc-component { padding: var(--rc-space); border-color: var(--rc-rule); }
.rc-component h3, .rc-matrix-panel h3 { margin: 0 0 1.35rem; font-size: clamp(1.5rem,2.3vw,2rem); }
.rc-component .recipe-detail-grid {
  grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr);
  gap: 1.8rem clamp(1.75rem,4vw,4.5rem);
  align-items: start;
}
.rc-component h4 { margin: 0 0 .7rem; font-size: 1rem; color: var(--purple); }
.rc-component .ingredients { border-top: 1px solid var(--rc-rule); }
.rc-component .ingredients li { align-items: baseline; border-color: var(--rc-rule); }
.rc-component .ingredients li span { min-width: 0; overflow-wrap: anywhere; }
.rc-component .ingredients li strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-instructions { margin: 0; padding-inline-start: 1.45rem; max-width: 72ch; line-height: 1.65; }
.rc-instructions li { padding-left: .3rem; }
.rc-instructions li + li { margin-top: .45rem; }
.rc-instructions li::marker { color: var(--purple); font-weight: 700; }
.rc-help { border: 1px solid var(--rc-rule); border-radius: 1rem; overflow: hidden; margin: 0 0 1rem; }
.rc-help summary {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  color: var(--purple);
  font-weight: 600;
}
.rc-help summary::-webkit-details-marker { display:none; }
.rc-help summary::after {
  content: '';
  flex: 0 0 .55rem;
  width: .55rem;
  height: .55rem;
  border-right: 1.6px solid;
  border-bottom: 1.6px solid;
  transform: rotate(45deg);
  margin-right: .15rem;
}
.rc-help[open] summary::after { transform: rotate(225deg); }
.rc-help summary:focus-visible { outline-offset: -5px; }
.rc-help p { margin: 0; padding: 0 1.25rem 1rem; color: var(--muted); }
.rc-download { padding: clamp(1.2rem,2.8vw,2rem); background: var(--cream); border: 0; }
.rc-download .actions { margin: 0; }
.rc-wide-chart { display: grid; gap: var(--rc-space); margin-block: var(--rc-space); }
.rc-matrix {
  width: 100%;
  border-spacing: 0;
  border: 1px solid var(--rc-rule);
  border-radius: .85rem;
  overflow: hidden;
  text-align: left;
  table-layout: fixed;
  font-size: .94rem;
}
.rc-matrix thead { background: #efedf4; color: var(--purple); }
.rc-matrix th, .rc-matrix td { padding: .85em; overflow-wrap: anywhere; }
.rc-matrix th { font-weight: 600; }
.rc-matrix thead th:first-child { width: 24%; }
.rc-matrix thead th:nth-child(2) { width: 15%; }
.rc-matrix tbody tr + tr > * { border-top: 1px solid var(--rc-rule); }
.rc-matrix td:nth-child(2) { font-variant-numeric: tabular-nums; }
.rc-active-cell span:first-child { color: #996700; }
.rc-voice {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (min-width: 48.5rem) and (max-width: 55rem) {
  .rc-detail-head { grid-template-columns: minmax(0,.65fr) minmax(0,1.35fr); }
}
@media (max-width: 48.5rem) {
  .rc-page .rc-detail-head { grid-template-columns: 1fr; gap: 1.15rem; }
  .rc-detail-head .rc-tile { min-height: 8rem; max-height: 10rem; aspect-ratio: 3.8; }
  .rc-component .recipe-detail-grid, .rc-list-head { grid-template-columns: minmax(0, 1fr); }
  .rc-wide-chart { display: none; }
}
@media (max-width: 38rem) {
  .rc-search { grid-template-columns: minmax(0,1fr); }
  .rc-list-head { gap: .8rem; }
  .rc-locked > div, .rc-download > div:first-child { flex-basis: 100%; }
  .rc-stage { width: min(60%, 10rem); }
  .rc-view-tabs { width: 100%; }
  .rc-view-tabs a { flex: 1 1 5rem; padding-inline: .4rem; font-size: .88rem; }
  .rc-download .actions { width: 100%; align-items: stretch; }
  .rc-download .actions > * { flex: 1 1 7rem; padding-inline: .65rem; }
}
