:root {
  --sidebar-width: 256px;
}

/* Approved professional Ocak, recipe detail and Ev Marketi surfaces. */
.cook-hero {
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 178px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #e1d5c0;
  border-radius: 22px;
  background: linear-gradient(120deg, #fffdf8, #fbf5ea);
}

.cook-hero::after {
  position: absolute;
  right: 24px;
  bottom: -42px;
  width: 170px;
  height: 170px;
  border: 1px solid rgb(190 151 77 / 18%);
  border-radius: 50%;
  content: "";
}

.cook-hero > .recipe-image,
.cook-hero > .recipe-photo-placeholder {
  width: 250px;
  height: 146px;
  min-height: 0;
  border-radius: 16px;
  object-fit: cover;
}

.cook-hero-copy { position: relative; z-index: 1; }
.cook-hero-copy h2 { margin: 5px 0 4px; font-size: clamp(1.7rem, 2.2vw, 2.45rem); }
.cook-hero-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.cook-status { position: relative; z-index: 1; align-self: start; margin: 34px 26px 0 0; padding: 12px 20px; border-radius: 13px; background: #e4eddd; color: #2f633c; font-weight: 800; }
.cook-progress { display: grid; grid-template-columns: auto minmax(180px, 420px); gap: 16px; align-items: center; margin-top: 22px; color: var(--terracotta); }
.cook-progress > span { height: 8px; overflow: hidden; border-radius: 99px; background: #e8e1d3; }
.cook-progress i { display: block; height: 100%; border-radius: inherit; background: var(--petrol); }

.professional-cooking { display: grid; grid-template-columns: minmax(310px, .72fr) minmax(0, 1.55fr); gap: 22px; align-items: stretch; }
.prep-panel { padding: 20px 10px 12px; border-color: #e1d5c0; }
.prep-panel h3 { margin: 0 14px 12px; color: var(--petrol); }
.prep-panel h3 span { color: var(--gold); }
.prep-list { display: grid; margin: 0; padding: 0; list-style: none; }
.prep-list li { border-top: 1px solid #e6dccb; }
.prep-list label { display: grid; grid-template-columns: 26px 32px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 57px; padding: 7px 14px; cursor: pointer; }
.prep-list input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.prep-check { width: 21px; height: 21px; border: 2px solid #2d6a66; border-radius: 50%; background: #fff; }
.prep-list input:checked + .prep-check { box-shadow: inset 0 0 0 5px #fff; background: var(--petrol); }
.ingredient-symbol { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #f1e6d2; color: #9c642e; }
.prep-list strong { font-weight: 650; }
.prep-list em { padding: 7px 12px; border-radius: 999px; background: #f3f1e6; font-style: normal; white-space: nowrap; }
.prep-hint { margin: 12px 8px 0; padding: 12px 14px; border-radius: 12px; background: #eef2df; color: #53715f; font-size: .84rem; }

.cook-step-card { overflow: hidden; border: 1px solid #e1d5c0; border-radius: 22px; background: #fffdfa; }
.step-track { display: grid; grid-template-columns: repeat(3,1fr); min-height: 126px; align-items: center; padding: 20px 12%; background: linear-gradient(135deg,#174f49,#0b3e39); color: #fff; }
.step-track span { position: relative; display: grid; justify-items: center; gap: 7px; color: #dce9e5; }
.step-track span:not(:last-child)::after { position: absolute; top: 18px; left: 64%; width: 72%; border-top: 1px dashed rgb(255 255 255 / 45%); content: ""; }
.step-track b { display: grid; z-index: 1; width: 38px; height: 38px; place-items: center; border: 1px solid #d7e7e3; border-radius: 50%; background: #164e48; }
.step-track .active b { border-color: #e9b65b; background: #e9b65b; color: #173f3b; }
.step-body { display: grid; gap: 18px; padding: 30px; }
.step-body > h3 { margin: -8px 0 4px; color: var(--petrol); font-size: 1.6rem; }
.voice-note,.timer-card { display: flex; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid #eadcc5; border-radius: 14px; background: #fffaf1; }
.voice-note > span,.timer-card > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #e0ead8; color: var(--petrol); font-size: 1.25rem; }
.voice-note p { margin: 0; }.voice-note small,.timer-card small { color: var(--muted); }
.timer-card > div { display: grid; gap: 3px; }.timer-card strong { color: var(--petrol); font-family: "Miras Serif",Georgia,serif; font-size: 1.9rem; }.timer-card button { margin-left: auto; }
.cook-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

.recipe-detail-dialog { width: min(1500px,calc(100vw - 56px)); max-height: 94vh; border-radius: 22px; }
.recipe-detail-dialog .dialog-head { display: none; }
.recipe-detail-dialog #modal-body { max-height: 94vh; padding: 0; }
.recipe-detail-workspace { background: #fffdfa; }
.recipe-detail-hero { display: grid; grid-template-columns: minmax(430px,1fr) minmax(420px,1fr); gap: 38px; align-items: center; padding: 22px; }
.recipe-detail-hero > .featured-image,.recipe-detail-hero > .recipe-photo-placeholder { width: 100%; height: 330px; min-height: 0; border-radius: 17px; object-fit: cover; }
.recipe-detail-hero h2 { margin: 18px 0; color: var(--petrol); font-size: clamp(2.4rem,4vw,4rem); }
.recipe-detail-hero p { max-width: 650px; color: var(--muted); line-height: 1.7; }
.back-chip { float: right; padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fffdfa; color: var(--muted); }
.recipe-detail-hero .meta-row { gap: 12px; }
.recipe-detail-hero .meta-chip { padding: 8px 15px; border: 0; border-radius: 12px; background: #f8eadb; color: #77522e; font-weight: 800; }
.recipe-detail-hero .meta-chip:nth-child(2) { background: #eaf0e7; color: var(--petrol); }
.recipe-detail-columns { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; padding: 0 22px 100px; }
.detail-card { padding: 20px; border: 1px solid #e2d8c7; border-radius: 16px; background: #fff; }
.detail-card h3 { margin: 0 0 16px; color: var(--petrol); font-size: 1.45rem; }
.ingredient-card ul,.method-card ol,.tips-card ul { margin: 0; padding: 0; list-style: none; }
.ingredient-card li { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 14px; border-top: 1px dotted #ded4c3; }
.ingredient-card li:first-child { border-top: 0; }.ingredient-card b { padding: 7px 13px; border-radius: 10px; background: #eaf0e7; }
.detail-right { display: grid; gap: 18px; }.method-card li { display: grid; grid-template-columns: 34px 1fr; align-items: center; min-height: 55px; border-top: 1px solid #eee4d5; }.method-card li:first-child { border-top: 0; }.method-card li b { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--petrol); color: white; }
.tips-empty { display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: 13px; background: #f5f6ef; color: var(--muted); }.tips-empty > span { color: #c99c45; font-size: 2rem; }.tips-empty p { margin: 0; }.tips-empty strong { color: var(--ink); }
.recipe-detail-actions { position: sticky; z-index: 3; bottom: 0; display: flex; gap: 14px; padding: 16px 22px; border-top: 1px solid #ded5c6; background: rgb(255 253 250 / 96%); box-shadow: 0 -10px 30px rgb(39 48 40 / 6%); }.recipe-detail-actions .more-button { width: 46px; min-width: 46px; height: 46px; margin-left: auto; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--petrol); font-size: 1.35rem; }

.market-toolbar { display: grid; grid-template-columns: minmax(320px,1.55fr) minmax(190px,.7fr) minmax(185px,.66fr) auto auto; gap: 9px; align-items: stretch; padding: 8px; border: 1px solid #ded3c1; border-radius: 15px; background: linear-gradient(135deg,#fffdfa,#faf7ef); box-shadow: 0 7px 24px rgb(43 50 42 / 4%); }
.market-search,.market-filter,.market-sort { position: relative; display: grid; min-height: 48px; align-content: center; border: 1px solid #dfd4c2; border-radius: 10px; background: #fff; transition: border-color 160ms ease,box-shadow 160ms ease; }
.market-search:focus-within,.market-filter:focus-within,.market-sort:focus-within { border-color: #7f9d91; box-shadow: 0 0 0 3px rgb(23 71 67 / 9%); }
.market-search { grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 7px; padding: 6px 12px; }
.market-search > span:first-child { grid-row: 1 / 3; align-self: center; color: var(--petrol); font-size: 1.12rem; }
.filter-caption { color: #8a8175; font-size: .67rem; font-weight: 800; letter-spacing: .07em; line-height: 1; text-transform: uppercase; }
.market-search input { width: 100%; min-width: 0; min-height: 0; height: 22px; padding: 2px 0 0; border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--ink); font-size: .88rem; }
.market-search input::placeholder { color: #aaa297; }
.market-filter,.market-sort { grid-template-rows: auto auto; padding: 6px 10px; }
.market-filter select,.market-sort select { width: 100%; min-width: 0; min-height: 0; height: 22px; padding: 2px 22px 0 0; border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--ink); font-size: .88rem; font-weight: 700; }
.market-sort { grid-template-columns: 22px 1fr; }.market-sort > span:first-child { grid-row: 1 / 3; align-self: center; color: var(--petrol); }.market-sort .filter-caption,.market-sort select { grid-column: 2; }
.market-result-count { align-self: center; justify-self: end; min-width: 82px; padding: 6px 10px; border-radius: 999px; background: #edf2e8; color: #3e693d; font-size: .76rem; font-weight: 800; text-align: center; white-space: nowrap; }
.market-toolbar .filter-clear { align-self: center; min-height: 34px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: var(--petrol); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.market-toolbar .filter-clear:hover:not(:disabled) { background: #edf1e7; }.market-toolbar .filter-clear:disabled { opacity: .38; cursor: default; }
.market-product-grid { display: grid; grid-template-columns: 1fr; gap: 0; overflow: visible; border: 1px solid #e1d5c0; border-radius: 17px; background: #fffdfa; }
.market-product-row { position: relative; display: grid; grid-template-columns: 92px minmax(210px,1.6fr) minmax(88px,.55fr) minmax(112px,.62fr) minmax(104px,.62fr) minmax(104px,.62fr) minmax(112px,.66fr) 48px; grid-template-areas: "visual identity package price unit updated evidence actions"; min-height: 116px; align-items: center; gap: 18px; padding: 10px 14px 10px 10px; overflow: visible; border: 0; border-bottom: 1px solid #e8dfcf; border-radius: 0; background: transparent; }
.market-product-row:last-child { border-bottom: 0; }
.product-visual { grid-area: visual; display: grid; width: 86px; height: 86px; place-items: center; overflow: hidden; margin: 0; border: 1px solid #e1d5c0; border-radius: 12px; background: linear-gradient(145deg,#f4ead7,#e6eee3); color: var(--petrol); }
.product-visual > img { width: 100%; height: 100%; object-fit: cover; }
.product-visual > span { display: grid; width: 56px; height: 56px; place-items: center; border: 1px solid rgb(22 76 70 / 20%); border-radius: 16px; background: #fffdf7; font-family: "Miras Serif",Georgia,serif; font-size: 1.8rem; font-weight: 800; }
.product-identity { grid-area: identity; min-width: 0; }
.product-identity h3 { display: -webkit-box; overflow: hidden; margin: 5px 0 2px; color: var(--petrol); font-family: "Miras Serif",Georgia,serif; font-size: 1.08rem; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-identity p { overflow: hidden; margin: 0; color: var(--muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.product-brand { color: var(--terracotta); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.package-line { grid-area: package; margin: 0; color: #665f55; white-space: nowrap; }
.row-price { grid-area: price; color: var(--petrol); font-family: "Miras Serif",Georgia,serif; font-size: 1.32rem; white-space: nowrap; }
.row-unit-price { grid-area: unit; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.row-updated { grid-area: updated; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.market-product-row .evidence-chip { grid-area: evidence; justify-self: start; padding: 7px 11px; border-radius: 999px; background: #e8f0e3; color: #3e693d; font-size: .76rem; white-space: nowrap; }
.product-menu { grid-area: actions; position: relative; z-index: 4; justify-self: end; }
.product-menu summary { display: grid; width: 40px; height: 40px; place-items: center; cursor: pointer; list-style: none; border: 1px solid #e1d5c0; border-radius: 50%; background: #fffdfa; color: var(--petrol); font-size: 1.35rem; transition: background 160ms ease,border-color 160ms ease; }
.product-menu summary::-webkit-details-marker { display: none; }
.product-menu summary:hover,.product-menu[open] summary { border-color: #b9cbbc; background: #edf1e7; }
.product-menu > div { position: absolute; z-index: 8; top: 46px; right: 0; display: grid; width: 208px; padding: 7px; overflow: hidden; border: 1px solid #ddcfba; border-radius: 14px; background: #fff; box-shadow: 0 16px 38px rgb(43 50 42 / 18%); }
.product-menu button { display: grid; grid-template-columns: 24px 1fr; min-height: 42px; align-items: center; gap: 8px; justify-content: start; padding: 8px 11px; border: 0; border-bottom: 1px solid #eee7dc; border-radius: 8px; background: transparent; color: #2f302c; text-align: left; }
.product-menu button:last-child { border-bottom: 0; }
.product-menu button:hover { background: #f5f3ed; }
.product-menu button span { color: var(--petrol); font-size: 1.05rem; text-align: center; }
.product-menu button.danger-link,.product-menu button.danger-link span { color: #b4382e; }

@media (max-width: 1180px) {
  .professional-cooking,.recipe-detail-columns { grid-template-columns: 1fr; }
  .market-product-row { grid-template-columns: 84px minmax(190px,1.5fr) minmax(84px,.55fr) minmax(108px,.65fr) minmax(100px,.62fr) minmax(110px,.68fr) 46px; grid-template-areas: "visual identity package price unit evidence actions"; }
  .row-updated { display: none; }
  .market-toolbar { grid-template-columns: minmax(260px,1fr) 1fr 1fr; }
  .market-result-count { justify-self: start; }.market-toolbar .filter-clear { justify-self: end; }
}

@media (max-width: 760px) {
  .cook-hero { grid-template-columns: 88px 1fr; gap: 12px; min-height: 118px; }
  .cook-hero > .recipe-image,.cook-hero > .recipe-photo-placeholder { width: 88px; height: 88px; }
  .cook-hero-copy h2 { font-size: 1.25rem; }.cook-status { grid-column: 1/-1; margin: 0; justify-self: start; }.cook-progress { grid-template-columns: 1fr; gap: 7px; margin-top: 10px; }
  .step-track { min-height: 105px; padding-inline: 7%; }.step-body { padding: 20px 16px; }.cook-actions { position: sticky; bottom: 72px; grid-template-columns: 1fr 1fr; }.cook-actions .primary-button { grid-column: 1/-1; grid-row: 1; }
  .recipe-detail-dialog { width: 100vw; max-height: 100vh; border: 0; border-radius: 0; }.recipe-detail-dialog #modal-body { max-height: 100vh; }.recipe-detail-hero { grid-template-columns: 1fr; gap: 14px; padding: 12px; }.recipe-detail-hero > .featured-image,.recipe-detail-hero > .recipe-photo-placeholder { height: 260px; }.recipe-detail-hero h2 { margin: 8px 0; font-size: 2.1rem; }.recipe-detail-columns { padding: 0 12px 92px; }.recipe-detail-actions { overflow-x: auto; padding: 12px; }.recipe-detail-actions button { white-space: nowrap; }
  .market-toolbar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
  .market-search { grid-column: 1 / -1; }
  .market-filter,.market-sort { min-height: 48px; }
  .market-result-count { justify-self: stretch; min-width: 0; }.market-toolbar .filter-clear { justify-self: stretch; min-height: 32px; }
  .market-product-row { grid-template-columns: 78px minmax(0,1fr) 42px; grid-template-areas: "visual identity actions" "visual price evidence" "visual package updated"; min-height: 128px; gap: 5px 12px; padding: 10px; }
  .product-visual { width: 76px; height: 96px; }
  .product-identity h3 { font-size: 1rem; }
  .product-identity p,.row-unit-price { display: none; }
  .row-price { align-self: end; font-size: 1.2rem; }
  .row-updated { display: block; justify-self: end; font-size: .72rem; }
  .market-product-row .evidence-chip { justify-self: end; padding: 5px 8px; font-size: .7rem; }
  .package-line { align-self: start; font-size: .78rem; }
  .product-menu > div { position: fixed; top: auto; right: 16px; bottom: 86px; left: 16px; width: auto; }
}

html[data-web-theme="modern"] {
  --paper: #f3f7f5;
  --raised: #ffffff;
  --sunken: #e4efeb;
  --forest: #184d48;
  --petrol: #0d5853;
  --teal: #007d73;
  --border: #c8dcd6;
}

.parity-auth {
  min-height: 100vh;
}

.workspace {
  min-height: 100vh;
  background: var(--paper);
}

.workspace-sidebar {
  position: fixed;
  z-index: 70;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: rgb(255 253 248 / 97%);
  box-shadow: 8px 0 30px rgb(52 44 32 / 4%);
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--petrol);
  font-family: "Miras Serif", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
}

.workspace-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.workspace-brand span {
  display: grid;
}

.workspace-brand small {
  color: var(--muted);
  font-family: "Miras Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
}

.workspace-sidebar nav {
  display: grid;
  gap: 4px;
}

.nav-caption {
  margin: 4px 12px 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.nav-link span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--sunken);
  color: var(--petrol);
  font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
  background: #edf3e8;
  color: var(--petrol);
}

.nav-link.active span {
  background: var(--forest);
  color: white;
}

.sidebar-foot {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.workspace-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.workspace-topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(20px, 3vw, 46px);
  border-bottom: 1px solid var(--border);
  background: rgb(251 247 239 / 92%);
  backdrop-filter: blur(16px);
}

.workspace-topbar h1,
.workspace-topbar p {
  margin: 0;
}

.workspace-topbar h1 {
  color: var(--petrol);
  font-family: "Miras Serif", Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.mobile-nav-button,
.mobile-bottom-nav {
  display: none;
}

.icon-button {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--raised);
  color: var(--petrol);
  cursor: pointer;
  font-size: 1.25rem;
}

.secondary-button.compact {
  min-height: 42px;
  padding: 8px 14px;
}

#view-root {
  max-width: 1500px;
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 44px);
  outline: none;
}

.page-stack {
  display: grid;
  gap: 28px;
}

.page-heading h2,
.section-heading h2,
.panel h2,
.panel h3,
.featured-card h2,
.featured-card h3 {
  margin: 0;
  color: var(--petrol);
  font-family: "Miras Serif", Georgia, serif;
}

.page-heading p {
  max-width: 760px;
}

.action-heading,
.toolbar,
.panel-heading,
.dialog-actions,
.hero-actions,
.card-actions,
.choice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.action-heading,
.panel-heading {
  justify-content: space-between;
}

.welcome-grid,
.cooking-layout,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.7fr);
  align-items: start;
  gap: 20px;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.featured-card,
.panel,
.profile-hero {
  padding: clamp(20px, 2.5vw, 32px);
}

.featured-card {
  background: linear-gradient(135deg, #f8f0de, #edf3e8);
}

.hero-actions {
  margin-top: 22px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.module-card {
  display: grid;
  min-height: 164px;
  align-content: center;
  justify-items: start;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--raised);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.module-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.module-card > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--sunken);
  color: var(--petrol);
  font-size: 1.35rem;
}

.module-card strong {
  color: var(--petrol);
  font-family: "Miras Serif", Georgia, serif;
  font-size: 1.1rem;
}

.module-card small {
  color: var(--muted);
  line-height: 1.45;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
  gap: 12px;
}

.filter-bar label,
.form-grid label,
.form-grid fieldset {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--raised);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.parity-card {
  cursor: default;
}

.parity-card .recipe-card-copy {
  display: grid;
  gap: 8px;
}

.card-actions {
  margin-top: 8px;
}

.card-actions button,
.timeline-row button,
.text-button,
.choice-row button,
.segmented-tabs button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--raised);
  color: var(--petrol);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.danger-link,
.danger-button {
  color: var(--error) !important;
}

.danger-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #dfaaa4;
  border-radius: 12px;
  background: #fff4f2;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.segmented-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--sunken);
}

.segmented-tabs button {
  flex: 1;
  white-space: nowrap;
}

.segmented-tabs button.active {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.responsive-table {
  overflow-x: auto;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.3fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--raised);
}

.timeline-row small,
.timeline-row span {
  color: var(--muted);
}

.check-list,
.shopping-list,
.plain-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.shopping-list li,
.plain-list li {
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--sunken);
}

.shopping-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cooking-layout {
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
}

.cooking-card {
  min-height: 360px;
  align-content: center;
}

.device-note {
  margin-top: 24px;
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: rgb(242 183 5 / 8%);
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: linear-gradient(135deg, #edf3e8, #fff8e8);
}

.avatar.large {
  width: 74px;
  height: 74px;
  font-size: 1.8rem;
}

.settings-panel {
  max-width: 760px;
}

.choice-row > span,
.choice-row button.selected {
  padding: 9px 13px;
  border: 1px solid #b7d6c7;
  border-radius: 999px;
  background: #edf7f0;
  color: var(--success);
  font-weight: 700;
}

.app-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(88vh, 920px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--raised);
  color: var(--ink);
  box-shadow: 0 30px 90px rgb(20 30 25 / 26%);
}

.app-dialog::backdrop {
  background: rgb(16 28 24 / 50%);
  backdrop-filter: blur(4px);
}

.dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--raised);
  color: var(--petrol);
  font-family: "Miras Serif", Georgia, serif;
  font-size: 1.25rem;
}

#modal-body {
  max-height: calc(88vh - 66px);
  overflow-y: auto;
  padding: 20px;
}

.form-grid,
.detail-stack {
  display: grid;
  gap: 16px;
}

.form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid fieldset {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.proposal-output {
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  border-radius: 12px;
  background: #172724;
  color: #e8fff9;
  white-space: pre-wrap;
}

.toast.error {
  background: var(--error);
}

@media (max-width: 1180px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-grid,
  .cooking-layout {
    grid-template-columns: 1fr;
  }

  .timeline-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-width: min(320px, 88vw);
  }

  .workspace-sidebar {
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .nav-open .workspace-sidebar {
    transform: translateX(0);
  }

  .nav-open::after {
    position: fixed;
    z-index: 60;
    inset: 0;
    content: "";
    background: rgb(15 25 22 / 42%);
  }

  .workspace-main {
    margin-left: 0;
  }

  .mobile-nav-button {
    display: block;
  }

  #view-root {
    padding: 20px 16px 100px;
  }

  .workspace-topbar {
    padding: 10px 14px;
  }

  .top-actions .secondary-button,
  .avatar-button > span:last-child {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 55;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--border);
    background: rgb(255 253 248 / 97%);
    backdrop-filter: blur(16px);
  }

  .bottom-link {
    display: grid;
    min-height: 55px;
    place-items: center;
    gap: 1px;
    border-radius: 11px;
    color: var(--muted);
    font-size: 1.05rem;
    text-decoration: none;
  }

  .bottom-link strong {
    font-size: 0.65rem;
  }

  .bottom-link.active {
    background: #edf3e8;
    color: var(--petrol);
  }
}

/* Reference-accurate type scale and one consistent line-icon language. */
html { font-size: 15px; }
body { font-size: 1rem; line-height: 1.45; }

.approved-shell {
  font-family: "Miras Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.approved-shell button,
.approved-shell input,
.approved-shell select,
.approved-shell textarea {
  font-family: "Miras Sans", Arial, sans-serif;
}

.approved-shell h1,
.approved-shell h2,
.approved-shell h3,
.approved-shell h4 {
  font-family: "Miras Serif", Georgia, serif;
  font-weight: 650;
  letter-spacing: -.018em;
  line-height: 1.18;
}

.approved-topbar .brand-lockup strong { font-size: 1.28rem; }
.approved-topbar .main-nav a { font-size: .86rem; font-weight: 600; }
.approved-topbar .sync-chip,
.approved-topbar .profile-trigger { font-size: .84rem; }
.approved-shell .page-heading h1,
.approved-shell .page-heading h2 { font-size: clamp(1.55rem, 2.1vw, 2.05rem); }
.approved-shell .page-heading p { font-size: .9rem; }
.approved-shell .eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.approved-shell .primary-button,
.approved-shell .secondary-button,
.approved-shell .text-button { font-size: .9rem; font-weight: 700; }

.ui-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vertical-align: middle;
}

.cook-status,
.prep-panel h3,
.prep-hint,
.timer-card button,
.cook-actions button {
  display: flex;
  align-items: center;
}

.cook-status { gap: 8px; font-size: .9rem; font-weight: 700; }
.cook-status .ui-icon { width: 21px; height: 21px; }
.cook-hero-copy h2 { font-size: clamp(1.65rem, 2.05vw, 2.18rem); }
.cook-hero-copy > p:not(.eyebrow) { font-size: .92rem; }
.cook-progress { font-size: .9rem; }
.prep-panel h3 { gap: 9px; font-size: 1.18rem; }
.prep-panel h3 .ui-icon { width: 25px; height: 25px; color: #9a8851; }
.prep-panel h3 > span { color: var(--petrol); }
.prep-list label { min-height: 53px; }
.ingredient-symbol {
  width: 32px;
  height: 32px;
  background: transparent;
  color: inherit;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  font-size: 1.35rem;
  line-height: 1;
}
.prep-list strong { font-size: .88rem; font-weight: 500; }
.prep-list em { font-size: .82rem; font-weight: 600; }
.prep-hint { gap: 8px; font-size: .78rem; }
.prep-hint .ui-icon { width: 17px; height: 17px; }
.step-track { font-size: .88rem; }
.step-track b { font-family: "Miras Serif", Georgia, serif; font-size: 1rem; }
.step-body > h3 { font-size: 1.35rem; }
.voice-note p { font-size: .88rem; line-height: 1.5; }
.voice-note small,
.timer-card small { font-size: .76rem; }
.voice-note > .ui-icon,
.timer-card > .ui-icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 50%;
  background: #e0ead8;
  color: var(--petrol);
}
.timer-card strong { font-size: 1.72rem; }
.timer-card button,
.cook-actions button { justify-content: center; gap: 8px; }
.timer-card button .ui-icon,
.cook-actions button .ui-icon { width: 18px; height: 18px; }
.recipe-detail-hero h2 { font-size: clamp(1.9rem, 3vw, 3rem); }
.recipe-detail-hero p { font-size: .92rem; }
.detail-card h3 { font-size: 1.2rem; }
.ingredient-card li,
.method-card li,
.tips-card { font-size: .9rem; }
.product-identity h3 { font-size: 1rem; }
.row-price { font-size: 1.22rem; }

@media (max-width: 760px) {
  html { font-size: 14px; }
  .approved-shell { font-size: 14px; }
  .cook-hero-copy h2 { font-size: 1.18rem; }
  .cook-status { padding: 9px 13px; }
  .prep-list strong { font-size: .86rem; }
  .step-body > h3 { font-size: 1.22rem; }
  .voice-note > .ui-icon,
  .timer-card > .ui-icon { width: 38px; height: 38px; padding: 9px; }
}

@media (max-width: 620px) {
  .module-grid,
  .two-column,
  .filter-bar,
  .form-pair,
  .timeline-row {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 128px;
  }

  .action-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .action-heading > button {
    width: 100%;
  }

  .segmented-tabs button {
    flex: 0 0 auto;
  }

  .workspace-topbar .eyebrow {
    display: none;
  }

  .workspace-topbar h1 {
    font-size: 1.15rem;
  }

  .shopping-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Approved "Miras Defteri" direction: horizontal navigation, paper surface and
   content-first dashboard. These rules intentionally supersede the temporary
   sidebar shell without removing the parity components used by inner pages. */
.approved-shell {
  min-height: 100vh;
  background:
    linear-gradient(110deg, rgb(255 255 255 / 42%), transparent 38%),
    var(--paper);
}

.approved-topbar {
  position: sticky;
  z-index: 80;
  top: 0;
}

.sync-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--petrol);
  cursor: pointer;
}

.mobile-drawer {
  display: none;
}

.approved-shell #view-root {
  max-width: var(--content);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(18px, 2.2vw, 34px) 24px 72px;
}

.approved-home {
  gap: 20px;
}

.approved-search {
  grid-template-columns: minmax(0, 1fr) 58px;
}

.filter-button {
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--raised);
  color: var(--petrol);
  cursor: pointer;
  font-size: 1.35rem;
}

.approved-featured {
  padding: 16px;
}

.approved-featured > .section-heading {
  padding: 0 4px;
}

.approved-featured > .section-heading h2 {
  font-size: clamp(1.55rem, 2.1vw, 2.25rem);
}

.home-panel {
  padding: 17px;
}

.home-panel .panel-heading h2 {
  color: var(--petrol);
  font-family: "Miras Serif", Georgia, serif;
  font-size: 1.12rem;
}

.home-panel .text-button,
.approved-home .section-heading .text-button {
  padding: 5px 7px;
  border: 0;
  background: transparent;
}

.consume-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  background: #f7f4ec;
}

.consume-item small,
.empty-compact {
  color: var(--muted);
}

.empty-compact {
  margin: 6px 0;
  line-height: 1.45;
}

.recipe-photo-placeholder {
  display: grid;
  width: 100%;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgb(49 83 38 / 8%), rgb(242 183 5 / 8%)),
    #f5efe2;
  color: var(--petrol);
  text-align: center;
}

.recipe-photo-placeholder img,
.recipe-card .recipe-photo-placeholder img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  opacity: 0.72;
}

.recipe-photo-placeholder span {
  font-family: "Miras Serif", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.recipe-photo-placeholder small {
  color: var(--muted);
}

.recipe-card .recipe-image {
  height: 220px;
}

.featured-recipe .recipe-photo-placeholder.featured-image {
  min-height: 360px;
}

@media (min-width: 861px) {
  .approved-featured .featured-recipe {
    height: 430px;
  }

  .approved-featured .featured-image {
    height: 430px;
    min-height: 0;
  }
}

.source-add-card {
  display: grid;
  min-height: 126px;
  align-content: center;
  justify-items: start;
  gap: 5px;
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgb(255 253 248 / 72%);
  color: var(--petrol);
  cursor: pointer;
  text-align: left;
}

.source-add-card > span {
  font-size: 1.8rem;
}

.source-add-card small {
  color: var(--muted);
}

@media (max-width: 1220px) {
  .nav-open .approved-topbar .main-nav {
    display: flex;
  }
}

@media (max-width: 820px) {
  .approved-shell #view-root {
    padding: 18px 14px 96px;
  }

  .approved-topbar .main-nav {
    display: none !important;
  }

  .mobile-drawer {
    position: fixed;
    z-index: 75;
    top: 65px;
    right: 12px;
    left: 12px;
    display: grid;
    max-height: calc(100vh - 150px);
    gap: 10px;
    overflow-y: auto;
    padding: 12px;
    transform: translateY(-135%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--raised);
    box-shadow: var(--shadow);
    transition: transform 180ms ease;
  }

  .nav-open .mobile-drawer {
    transform: translateY(0);
  }

  .approved-search {
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .approved-dashboard,
  .utility-column {
    grid-template-columns: 1fr;
  }

  .approved-featured .featured-recipe {
    grid-template-columns: 1fr;
  }

  .featured-recipe .recipe-photo-placeholder.featured-image {
    min-height: 240px;
  }

  .approved-topbar .sync-control > span:last-child,
  .approved-topbar .avatar-button > span:last-child {
    display: none;
  }
}

/* Keep approved surface geometry authoritative over legacy parity rules. */
.professional-cooking {
  display: grid;
  grid-template-columns: minmax(310px, .72fr) minmax(0, 1.55fr);
  gap: 22px;
  align-items: stretch;
}

.app-dialog.recipe-detail-dialog {
  width: min(1500px, calc(100vw - 56px));
  max-height: 94vh;
  border-radius: 22px;
}

.app-dialog.recipe-detail-dialog #modal-body {
  max-height: 94vh;
  padding: 0;
}

@media (max-width: 1180px) {
  .professional-cooking,
  .recipe-detail-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-dialog.recipe-detail-dialog {
    width: 100vw;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .app-dialog.recipe-detail-dialog #modal-body {
    max-height: 100vh;
  }
}

/* Dashboard, recipe archive and source vault refinement. */
.search-field > .ui-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 18px;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  color: var(--petrol);
}

.filter-button {
  display: grid;
  place-items: center;
}

.filter-button .ui-icon { width: 21px; height: 21px; }

.recipe-filter-bar {
  grid-template-columns: minmax(360px, 620px) 220px;
  max-width: 860px;
  align-items: end;
}

.approved-featured .featured-recipe {
  height: 390px;
  min-height: 390px;
  grid-template-columns: minmax(360px, 1.08fr) minmax(330px, .92fr);
}

.approved-featured .featured-image {
  height: 390px;
  min-height: 0;
  object-fit: cover;
}

.approved-featured .featured-copy {
  min-width: 0;
  justify-content: center;
  padding: clamp(26px, 3vw, 42px);
}

.approved-featured .featured-copy .heritage-note {
  margin-bottom: 15px;
  padding: 5px 10px;
  font-size: .9rem;
}

.approved-featured .featured-copy h2 {
  max-width: 520px;
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 2.35vw, 2.65rem);
  line-height: 1.06;
  text-wrap: balance;
}

.approved-featured .featured-copy > p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 8px;
  font-size: .88rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.approved-featured .meta-row { margin: 6px 0 14px; }
.approved-featured .hero-actions { margin-top: 0; }

.home-panel .panel-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.home-panel .panel-heading .text-button,
.source-heading .primary-button,
.source-page-heading .primary-button,
.source-card .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.home-panel .panel-heading .text-button .ui-icon,
.source-card .text-button .ui-icon { width: 15px; height: 15px; }

.home-panel-icon,
.section-icon,
.source-add-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #e4eee7;
  color: var(--petrol);
}

.home-panel-icon.amber { background: #f7edd6; color: #9d6b20; }
.home-panel-icon.terracotta { background: #f7e5dd; color: var(--terracotta); }
.home-panel-icon .ui-icon { width: 18px; height: 18px; }

.source-heading > div,
.source-page-heading > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.source-heading .section-icon,
.source-page-heading .section-icon {
  width: 46px;
  height: 46px;
  border: 1px solid #d3dfd5;
  border-radius: 14px;
  background: #edf3e9;
}

.section-icon .ui-icon { width: 24px; height: 24px; }
.source-heading h2,
.source-page-heading h2 { margin: 0; }
.source-heading p,
.source-page-heading p { margin: 3px 0 0; color: var(--muted); font-size: .88rem; }

.source-preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.source-preview-card,
.source-library-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 148px 1fr;
  min-height: 310px;
  overflow: hidden;
  border-color: #dfd3c0;
  background: #fffdfa;
  box-shadow: 0 8px 22px rgb(39 48 40 / 5%);
}

.source-cover {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #eee4d4, #e4ede5);
}

.source-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.source-card:hover .source-cover img { transform: scale(1.025); }

.source-cover .source-kind {
  position: absolute;
  right: 12px;
  bottom: 11px;
  margin: 0;
  border: 1px solid rgb(255 255 255 / 65%);
  background: rgb(255 253 248 / 92%);
  box-shadow: 0 3px 10px rgb(35 31 26 / 10%);
}

.source-card .source-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px 17px;
}

.source-card .source-card-copy h3 { margin: 0; font-size: 1.08rem; }
.source-card .source-card-copy > p:not(.source-kicker) { font-size: .84rem; }
.source-kicker {
  color: var(--terracotta) !important;
  font-size: .68rem !important;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.source-card .text-button { margin-top: auto; padding-inline: 0; border: 0; }

.source-add-card {
  min-height: 310px;
  align-content: center;
  justify-items: center;
  padding: 26px;
  border-style: dashed;
  background: linear-gradient(145deg, rgb(255 253 248 / 75%), #f3f2e8);
  text-align: center;
}

.source-add-icon { width: 48px; height: 48px; border-radius: 14px; }
.source-add-icon .ui-icon { width: 23px; height: 23px; }
.source-add-card strong { font-family: "Miras Serif", Georgia, serif; font-size: 1.05rem; }

.source-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.source-library-card { grid-template-rows: 190px 1fr; min-height: 390px; }
.source-library-card .source-card-copy { justify-content: space-between; }
.source-card-footer { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid #ece3d6; }
.source-status { color: var(--muted); font-size: .76rem; font-weight: 700; }
.source-card-footer .card-actions { margin: 0; }

/* Mobile-parity functions added without changing the approved visual system. */
.natural-voice-note { align-items: center; }
.natural-voice-note p { margin-right: auto; }
.voice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.voice-actions button { min-height: 40px; padding: 9px 13px; font-size: .78rem; }

.costing-workspace { display: grid; gap: 18px; }
.costing-workspace-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffdfa;
}
.costing-workspace-head h3 { margin: 3px 0; font-size: 1.5rem; }
.costing-workspace-head p { margin: 0; color: var(--muted); }
.cost-summary { display: grid; grid-template-columns: repeat(2, auto); gap: 5px 22px; padding: 14px 18px; border-radius: 14px; background: var(--petrol); color: #fff; }
.cost-summary span { display: grid; gap: 2px; font-size: .72rem; }
.cost-summary strong { font-family: "Miras Serif", Georgia, serif; font-size: 1.25rem; }
.cost-summary small { grid-column: 1 / -1; opacity: .75; }
.cost-line-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cost-line { padding: 18px; border: 1px solid #ded5c6; border-radius: 17px; background: #fffdfa; box-shadow: 0 5px 18px rgb(39 48 40 / 4%); }
.cost-line.excluded { background: #f4f2ec; opacity: .82; }
.cost-line-title { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.cost-line-title strong,.cost-line-title small { display: block; }
.cost-line-title strong { font-size: 1rem; }
.cost-line-title small { margin-top: 3px; color: var(--muted); }
.cost-include input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cost-include span { display: block; width: 24px; height: 24px; border: 2px solid var(--petrol); border-radius: 7px; }
.cost-include input:checked + span { background: var(--petrol); box-shadow: inset 0 0 0 4px #fff; }
.cost-state { padding: 5px 9px; border-radius: 999px; background: #e5f0e6; color: #356133; font-size: .69rem; }
.cost-state.warning { background: #fbe9dc; color: #a94d2e; }
.manual-product { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 10px; color: var(--petrol); font-size: .82rem; font-weight: 700; }
.manual-product input { width: 18px; height: 18px; margin: 0; accent-color: var(--petrol); }
.cost-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cost-selects label { color: var(--muted); font-size: .72rem; }
.cost-selects select { width: 100%; min-height: 46px; margin-top: 5px; padding: 9px 34px 9px 10px; border: 1px solid #d7dcd6; border-radius: 11px; background: #fff; color: var(--ink); }
.excluded-note { margin: 13px 0 0 36px; color: var(--muted); font-size: .8rem; }
.costing-footer { position: sticky; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: rgb(255 253 250 / 96%); box-shadow: 0 10px 34px rgb(39 48 40 / 12%); backdrop-filter: blur(12px); }
.costing-footer > div { display: grid; margin-right: auto; }
.costing-footer small { margin-top: 2px; color: var(--muted); }

.review-notice { padding: 14px 16px; border-left: 4px solid var(--petrol); border-radius: 10px; background: #edf3e9; }
.review-notice p { margin: 5px 0 0; color: var(--muted); }
.verbatim-step-list { display: grid; gap: 12px; }
.verbatim-step-list label { display: grid; gap: 5px; }
.verbatim-step-list textarea { min-height: 80px; }
.verbatim-step-list .uncertain-step { color: #a62929; }
.verbatim-step-list .uncertain-step textarea { border: 2px solid #c74343; background: #fff7f7; color: #8e2020; }

@media (max-width: 1180px) {
  .approved-featured .featured-recipe { grid-template-columns: 1fr 1fr; }
  .source-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .recipe-filter-bar { grid-template-columns: minmax(0, 1fr) 180px; max-width: none; }
  .approved-featured .featured-recipe { grid-template-columns: 1fr; }
  .approved-featured .featured-recipe { height: auto; min-height: 0; }
  .approved-featured .featured-image { height: 260px; min-height: 260px; }
  .approved-featured .featured-copy { padding: 24px; }
  .approved-featured .featured-copy h2 { font-size: 2rem; }
  .cost-line-list { grid-template-columns: 1fr; }
  .costing-workspace-head { grid-template-columns: auto 1fr; }
  .cost-summary { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 560px) {
  .recipe-filter-bar,
  .source-preview-grid,
  .source-library-grid { grid-template-columns: 1fr; }
  .source-heading,
  .source-page-heading { align-items: stretch; }
  .source-heading > div,
  .source-page-heading > div { align-items: flex-start; }
  .source-heading .primary-button,
  .source-page-heading .primary-button { width: 100%; }
  .source-preview-card { min-height: 292px; }
  .voice-actions,.cost-selects { display: grid; grid-template-columns: 1fr; width: 100%; }
  .natural-voice-note { align-items: flex-start; }
  .costing-workspace-head { grid-template-columns: 1fr; padding: 15px; }
  .costing-workspace-head .back-chip { justify-self: start; }
  .costing-footer { position: static; display: grid; grid-template-columns: 1fr; }
  .costing-footer > div { margin: 0; }
  .costing-footer button { width: 100%; }
  .cost-line-title { grid-template-columns: auto minmax(0, 1fr); }
  .cost-state { grid-column: 2; justify-self: start; }
}
