﻿/* Source: library.css */
:root {
  --paper: #f7f5ef;
  --white: #fff;
  --ink: #20231e;
  --muted: #70736b;
  --accent: #b64230;
  --sage: #dce1d4;
  --line: #deddd6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 64px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  font:
    500 21px "Fraunces",
    serif;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid;
  border-radius: 50%;
}
.topbar nav {
  display: flex;
  gap: 32px;
  margin-left: 9vw;
}
.topbar nav a {
  height: 72px;
  display: flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.topbar nav .active {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}
.profile {
  margin-left: auto;
  border: 0;
  background: transparent;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.profile > span:first-child {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e4e7dd;
  font-size: 12px;
}
.profile small,
.profile strong {
  display: block;
}
.profile small {
  color: var(--muted);
  font-size: 10px;
}
.profile b {
  font-size: 16px;
}
.profile-menu {
  display: none;
  position: fixed;
  right: 4vw;
  top: 62px;
  width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px #20231e22;
  padding: 18px;
  z-index: 30;
}
.profile-menu.open {
  display: grid;
}
.profile-menu small {
  color: var(--muted);
  margin-top: 3px;
}
.profile-menu hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}
.profile-menu a,
.profile-menu button {
  padding: 8px 0;
  text-align: left;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}
main {
  max-width: 1500px;
  margin: auto;
  padding: 70px clamp(20px, 4vw, 64px) 100px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 54px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.page-head h1 {
  font:
    500 clamp(52px, 6vw, 82px) / 0.9 "Fraunces",
    serif;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}
.page-head > div > p:last-child {
  color: var(--muted);
  margin: 0;
}
.head-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.head-actions button,
.head-actions label {
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 13px inherit;
}
.head-actions button {
  cursor: pointer;
}
.head-actions button b {
  display: none;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  place-items: center;
}
.head-actions select {
  border: 0;
  background: transparent;
}
.recommendation {
  display: grid;
  grid-template-columns: minmax(380px, 1.08fr) 1fr;
  min-height: 340px;
  background: #242720;
  color: #fff;
  margin-bottom: 84px;
}
.rec-image {
  position: relative;
  overflow: hidden;
}
.rec-image img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rec-image > span {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 8px 10px;
}
.rec-copy {
  padding: 44px clamp(28px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.rec-copy h2 {
  font:
    500 clamp(30px, 3vw, 45px) / 1.05 "Fraunces",
    serif;
  margin: 0 0 14px;
}
.rec-copy > p:not(.eyebrow) {
  color: #c9cbc4;
  line-height: 1.6;
  margin: 0 0 18px;
}
.rec-meta {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: #dadbd5;
}
.rec-copy > a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #777970;
  padding-bottom: 5px;
  margin-top: auto;
}
.rec-copy > small {
  margin-top: 15px;
  color: #92958e;
}
.meal-section {
  margin-bottom: 76px;
}
.section-head {
  height: 116px;
  display: grid;
  grid-template-columns: 270px 1fr;
  align-items: stretch;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-heading h2 {
  font:
    500 38px "Fraunces",
    serif;
  margin: 0;
}
.section-heading span {
  color: var(--muted);
  font-size: 12px;
}
.treadmill {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}
.treadmill-track {
  height: 100%;
  width: 200%;
  display: flex;
  animation: treadmill 38s linear infinite;
}
.treadmill-track img {
  height: 100%;
  width: 50%;
  object-fit: cover;
  filter: saturate(0.78);
}
@keyframes treadmill {
  to {
    transform: translateX(-50%);
  }
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 28px;
}
.recipe-card {
  border-bottom: 1px solid var(--line);
  padding: 18px 0 22px;
  cursor: pointer;
  transition: padding 0.2s;
}
.recipe-card:hover {
  padding-left: 8px;
}
.card-top {
  display: flex;
  align-items: start;
  gap: 12px;
}
.recipe-card h3 {
  font:
    500 22px "Fraunces",
    serif;
  margin: 0;
  flex: 1;
}
.heart {
  border: 0;
  background: none;
  font-size: 19px;
  color: #a8aaa3;
  cursor: pointer;
}
.heart.active {
  color: var(--accent);
}
.card-meta {
  display: flex;
  gap: 15px;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 14px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #e8e8e0;
  padding: 5px 7px;
}
.filters {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(390px, 90vw);
  background: #fff;
  z-index: 50;
  padding: 34px;
  transform: translateX(-102%);
  transition: transform 0.3s;
  overflow: auto;
  box-shadow: 8px 0 40px #20231e22;
}
.filters.open {
  transform: none;
}
.veil {
  display: none;
  position: fixed;
  inset: 0;
  background: #15171188;
  z-index: 40;
}
.veil.open {
  display: block;
}
.filter-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
}
.filter-head small {
  color: var(--accent);
  letter-spacing: 0.14em;
}
.filter-head h2 {
  font:
    500 32px "Fraunces",
    serif;
  margin: 4px 0;
}
.filter-head button {
  border: 0;
  background: none;
  font-size: 28px;
  cursor: pointer;
}
.filters > label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  margin: 20px 0;
}
.filters input[type="search"],
.filters select {
  height: 45px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fafaf7;
  font: 14px inherit;
}
.filters fieldset {
  border: 0;
  padding: 0;
  margin: 24px 0;
}
.filters legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.filters fieldset label {
  display: inline-flex;
  gap: 5px;
  margin-right: 15px;
  font-size: 13px;
}
.toggle {
  grid-template-columns: 1fr auto !important;
  align-items: center;
}
.toggle small,
.toggle strong {
  display: block;
}
.toggle small {
  color: var(--muted);
  font-weight: 400;
  margin-top: 3px;
}
.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 36px;
}
.filter-actions button,
.empty button {
  height: 46px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}
.filter-actions button:last-child,
.empty button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.empty {
  text-align: center;
  padding: 80px;
}
.empty h2 {
  font:
    500 40px "Fraunces",
    serif;
  margin: 0;
}
.empty p {
  color: var(--muted);
}
.empty button {
  padding: 0 20px;
}
@media (max-width: 900px) {
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .recommendation {
    grid-template-columns: 1fr;
  }
  .rec-image {
    min-height: 300px;
  }
  .page-head {
    align-items: flex-start;
    gap: 30px;
    flex-direction: column;
  }
  .section-head {
    grid-template-columns: 220px 1fr;
  }
}
@media (max-width: 600px) {
  .topbar nav {
    display: none;
  }
  .profile > span:nth-child(2),
  .profile > b {
    display: none;
  }
  main {
    padding-top: 45px;
  }
  .head-actions {
    width: 100%;
  }
  .head-actions > * {
    flex: 1;
  }
  .recommendation {
    margin-inline: -20px;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    grid-template-columns: 1fr;
  }
  .treadmill {
    display: none;
  }
  .section-heading {
    justify-content: space-between;
  }
  .rec-copy {
    min-height: 330px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .treadmill-track {
    animation: none;
  }
}
.recipe-card h3 a,
.card-body-link {
  color: inherit;
  text-decoration: none;
}
.card-body-link {
  display: block;
}
.add-space {
  flex: 0 0 auto;
  color: var(--accent);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 7px;
  border: 1px solid #d9b5ae;
  cursor: pointer;
}
.add-space:hover,
.add-space.queued {
  background: #f0dfda;
}
.add-space.queued {
  color: #3e7049;
  border-color: #9ebda5;
}
.new-library-recipe {
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.recipe-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.recipe-card h3 {
  transition: color 0.2s;
}
.recipe-card:hover h3,
.recipe-card:focus-visible h3 {
  color: var(--accent);
}
body.dark_mode {
  --paper: #171915;
  --white: #22251f;
  --ink: #ecece6;
  --muted: #aaada4;
  --accent: #c55b48;
  --sage: #30362d;
  --line: #383b35;
}
.topbar,
.profile-menu,
.head-actions button,
.head-actions label,
.filters,
.filter-actions button {
  background: var(--white);
}
.filters input[type="search"],
.filters select {
  background: var(--paper);
  color: var(--ink);
}
.tags span {
  background: var(--sage);
}
.profile {
  margin-left: 12px;
}
.brand > span {
  display: block;
  width: 30px;
  height: 30px;
  border: 2px solid #111;
  border-radius: 50%;
  font-size: 0;
  background: repeating-radial-gradient(
    circle,
    #111 0 2px,
    transparent 3px 5px,
    #111 6px 7px,
    transparent 8px 10px
  );
  transition: 0.3s;
}
.brand:hover > span {
  border-color: #c33b2c;
  background: repeating-radial-gradient(
    circle,
    #d64a37 0 2px,
    transparent 3px 5px,
    #c33b2c 6px 7px,
    transparent 8px 10px
  );
  box-shadow:
    0 0 8px #d64a3777,
    0 0 18px #d64a3738;
}
body.dark_mode .brand > span {
  background-color: #e8e8e1;
}
body.dark_mode .profile > span:first-child {
  background: var(--sage);
  color: var(--ink);
}
.profile {
  color: var(--ink);
}
button:not(:disabled),
a[href],
select:not(:disabled),
label[for],
[role="button"]:not([aria-disabled="true"]),
[role="link"]:not([aria-disabled="true"]),
[data-action],
[data-url] {
  cursor: pointer;
}
button:disabled,
select:disabled,
input:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}
/* Whole-card interaction without changing layout dimensions on hover. */
.recipe-card {
  min-width: 0;
  padding: 20px 16px 22px;
  overflow: hidden;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease;
}
.recipe-card:hover,
.recipe-card:focus-visible {
  padding-left: 16px;
  transform: translateY(-4px);
  background: var(--white);
  border-color: var(--line);
  box-shadow: 0 12px 28px rgba(32, 35, 30, 0.12);
  outline: none;
}
.recipe-card .card-top,
.recipe-card .card-body-link,
.recipe-card h3 {
  min-width: 0;
  max-width: 100%;
}
.recipe-card h3 {
  overflow-wrap: anywhere;
  word-break: normal;
}
.recipe-card .card-meta {
  min-width: 0;
  flex-wrap: wrap;
}
.recipe-card .card-meta span,
.recipe-card .tags span {
  max-width: 100%;
  overflow-wrap: anywhere;
}
body.dark_mode .recipe-card:hover,
body.dark_mode .recipe-card:focus-visible {
  background: var(--white);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}
body {
  cursor: default;
}
input:not([type]),
input[type="text"],
input[type="search"],
input[type="url"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
[contenteditable="true"] {
  cursor: text;
}
