/* Dinner plan. One stylesheet for phone, iPad and desktop. */
:root {
  --bg: #f6f4ee; --card: #ffffff; --ink: #1f2a24; --muted: #5d6b63; --line: #e3dfd3;
  --green: #2f6f4e; --green-d: #24573d; --green-l: #e6f1ea; --amber: #b4650b; --amber-l: #fdf1dc;
  --red: #a8322b; --red-l: #fbe9e7; --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--green-d); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: .8rem; font-family: var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.2em 0 .4em; }
p { margin: 0 0 .7em; }
small { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { margin-right: 2px; }
.weekpick { margin-left: auto; min-width: 0; }
.weekpick select { max-width: 46vw; }
.logout { font-size: .9rem; color: var(--muted); white-space: nowrap; }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.tabs a.on { background: var(--green); color: #fff; }
.tabs a:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #8fc3a6; outline-offset: 2px; }
.pill { display: inline-block; min-width: 1.5em; padding: 1px 7px; border-radius: 999px; background: var(--amber); color: #fff; font-size: .78rem; text-align: center; font-weight: 700; }
.pill.ok { background: var(--green-l); color: var(--green-d); padding: 6px 12px; font-size: .85rem; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }
.pagehead { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.sub { color: var(--muted); max-width: 62ch; margin: 0; }
.totals { display: flex; gap: 10px; }
.totals div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; min-width: 120px; }
.totals span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.totals strong { font-size: 1.45rem; font-family: var(--serif); }
.splitline { color: var(--muted); font-size: .92rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cards .card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }

.meal-top { display: flex; gap: 12px; align-items: flex-start; }
.daynum { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green-l); color: var(--green-d); font-weight: 700; display: grid; place-items: center; }
.meal h2 { margin: 0 0 2px; font-size: 1.25rem; }
.meal h2 a { color: var(--ink); text-decoration: none; }
.meal h2 a:hover { text-decoration: underline; }
.src { color: var(--muted); font-size: .9rem; margin: 0; }
.veg { color: var(--green-d); font-weight: 600; }
.veg.low { color: var(--red); }
.macros { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.macros.wide { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); margin: 14px 0 6px; }
.macro { background: var(--bg); border-radius: 10px; padding: 7px 4px; text-align: center; }
.macro span { display: block; }
.macro-l { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.macro-v { font-weight: 700; font-size: 1.02rem; }
.macro-p { font-size: .72rem; color: var(--muted); min-height: 1em; }
abbr { text-decoration: none; color: var(--amber); }
.costs { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .92rem; color: var(--muted); }
.costs strong { color: var(--ink); }
.meal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.inline { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.inline label { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c9c3b2; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-d); }
.btn.danger { color: var(--red); border-color: #e9c9c5; }
.link { background: none; border: 0; padding: 8px 0; color: var(--green-d); font: inherit; text-decoration: underline; cursor: pointer; }

label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); }
input, select, textarea { font: 16px var(--font); color: var(--ink); background: #fff; border: 1px solid #cfc9b9; border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
textarea { resize: vertical; line-height: 1.45; }
input.tiny { width: 64px; text-align: center; padding: 8px; }
input[type=checkbox] { width: 24px; height: 24px; min-height: 0; flex: none; accent-color: var(--green); padding: 0; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: .92rem; }
label.check.small { font-size: .78rem; color: var(--muted); margin-top: 4px; }
label.check.small input { width: 18px; height: 18px; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.row.between { justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.row.wrap { flex-wrap: wrap; }
.row select, .row input:not(.tiny) { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.fgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fgrid .span2 { grid-column: span 2; }
.fgrid.six { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); align-items: end; }

details.more { border-top: 1px solid var(--line); padding-top: 8px; }
summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 8px 0; min-height: 40px; }
details.more[open] summary { margin-bottom: 8px; }
.hint { color: var(--muted); font-size: .88rem; }
.empty { color: var(--muted); padding: 12px 0; }
.good { color: var(--green-d); font-weight: 600; }
.flash { padding: 12px 16px; border-radius: 12px; background: var(--green-l); color: var(--green-d); font-weight: 600; }
.flash.err { background: var(--red-l); color: var(--red); }
.lock { background: var(--green-l); color: var(--green-d); border-radius: 12px; padding: 12px 16px; font-weight: 600; }
.lock.warn { background: var(--amber-l); color: #7a4406; font-weight: 500; }
.flags { margin: 0 0 12px; padding: 0; list-style: none; }
.flags li { background: var(--amber-l); color: #7a4406; border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; font-weight: 600; font-size: .93rem; }
.plain { margin: 0 0 10px; padding-left: 1.1em; }
.plain li { margin-bottom: 6px; }
.plain.cols { columns: 280px; list-style: none; padding: 0; }
.qty { color: var(--green-d); font-weight: 700; white-space: nowrap; }
.tag { display: inline-block; background: var(--amber-l); color: #7a4406; border-radius: 6px; padding: 1px 7px; font-size: .74rem; font-weight: 600; margin-left: 6px; }
.tag.have { background: var(--green-l); color: var(--green-d); }

.sechead { display: flex; justify-content: space-between; align-items: center; }
.ticklist { list-style: none; margin: 0; padding: 0; }
.ticklist li { border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.ticklist li:last-child { border-bottom: 0; }
.tick { flex: 1; flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 0; font-size: 1rem; font-weight: 400; color: var(--ink); cursor: pointer; }
.tick input:checked + span { color: #98a39d; text-decoration: line-through; }
.tick em { color: var(--muted); font-style: normal; }
.pnote { display: block; }
.x { background: none; border: 0; font-size: 1.5rem; color: #b5ae9c; cursor: pointer; min-width: 44px; min-height: 44px; }
.x:hover { color: var(--red); }
.shopline { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; flex: 1; }
.sl-price { font-weight: 700; text-align: right; }
.sl-meta { grid-column: 1 / -1; color: var(--muted); font-size: .84rem; }
.shoplist h3:first-of-type { margin-top: 0; }

.recipe h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.crumb { font-size: .92rem; }
.crumb a { text-decoration: none; }
.note { background: var(--amber-l); color: #6b3d06; border-radius: 12px; padding: 10px 14px; font-size: .9rem; margin-top: 10px; }
.recipe-cols { display: grid; gap: 18px; margin-top: 18px; }
.recipe section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.recipe .tick { font-size: 1.15rem; padding: 14px 0; }
.recipe .tick input { width: 28px; height: 28px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 20px 50px; font-size: 1.2rem; line-height: 1.55; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 1rem; display: grid; place-items: center; }

.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.listrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.listrow:last-child { border-bottom: 0; }
.grow { flex: 1; min-width: 180px; }
.title { font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--ink); }
.star { background: none; border: 0; font-size: 1.6rem; color: #c9c3b2; cursor: pointer; min-width: 44px; min-height: 44px; }
.star.on { color: #d99a1c; }

.ingrow { border-bottom: 1px solid var(--line); }
.ingrow summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--ink); font-weight: 400; padding: 12px 0; }
.ingrow summary em { color: var(--muted); font-style: normal; }
.ingmeta { color: var(--muted); font-size: .85rem; white-space: nowrap; text-align: right; }
.addrow { border-bottom: 0; }
.ingform, .prodform { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 4px 0 16px; align-items: end; }
.ingform .f-item, .ingform .f-prep, .ingform .f-prod, .ingform .f-new, .ingform .f-btn, .ingform .f-opt, .prodform .span2, .prodform .f-btn { grid-column: 1 / -1; }
.f-btn { display: flex; gap: 8px; flex-wrap: wrap; }
.newprod { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.newprod label:first-child { grid-column: 1 / -1; }

.rule { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.rule textarea { flex: 1; }
.rulebtns { display: flex; flex-direction: column; gap: 6px; }
.rules { list-style: none; padding: 0; margin: 0 0 10px; }
.rules li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.rules li.off { color: var(--muted); font-weight: 400; }

.queue { list-style: none; padding: 0; margin: 0 0 14px; }
.queue li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.op { flex: none; width: 92px; text-align: center; border-radius: 8px; padding: 4px 6px; font-weight: 700; font-size: .82rem; background: var(--green-l); color: var(--green-d); }
.op-remove .op { background: var(--red-l); color: var(--red); }
.op-change_qty .op { background: var(--amber-l); color: #7a4406; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tfoot th { font-size: 1rem; color: var(--ink); text-transform: none; letter-spacing: 0; border-bottom: 0; }
.r { text-align: right; }

body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; width: 100%; max-width: 380px; }
.login-card .brand { font-size: 1.5rem; margin-bottom: 8px; }
.login-card form { display: grid; gap: 10px; }

@media (min-width: 720px) {
  .top { padding: 14px 24px; }
  .tabs { padding: 8px 20px; }
  .wrap { padding: 28px 24px 80px; }
  .ingform { grid-template-columns: 2fr 1fr 1fr 2fr; }
  .ingform .f-item, .ingform .f-prep { grid-column: auto; }
  .ingform .f-prod { grid-column: span 2; }
  .ingform .f-opt { grid-column: span 2; }
  .prodform { grid-template-columns: repeat(4, 1fr); }
  .prodform .span2 { grid-column: span 2; }
  .newprod { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
  .newprod label:first-child { grid-column: auto; }
  .fgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .recipe-cols { grid-template-columns: minmax(300px, 2fr) 3fr; align-items: start; }
  .recipe .ings { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; }
}
@media (max-width: 480px) {
  .totals { width: 100%; }
  .totals div { flex: 1; min-width: 0; }
  .macros { gap: 4px; }
  .macro-v { font-size: .95rem; }
  .inline { margin-left: 0; }
  .rule { flex-direction: column; }
  .rule textarea { width: 100%; }
  .rulebtns { flex-direction: row; }
  .op { width: 76px; }
  .steps li { font-size: 1.12rem; padding-left: 46px; }
  .logout { font-size: .82rem; }
}
@media print {
  .top, .tabs, .btn, .link, form { display: none !important; }
  body { background: #fff; }
}

/* ---- Full app (MON-5508): household, who is eating, picking, feedback, queue statuses ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.chip { flex-direction: row; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--muted); font-size: .98rem; font-weight: 600; }
.chip span::before { content: "+"; font-weight: 700; }
.chip input:checked + span { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.chip input:checked + span::before { content: "\2713"; }
.chip input:focus-visible + span { outline: 3px solid #8fc3a6; outline-offset: 2px; }
.chip small { color: inherit; opacity: .75; font-weight: 500; }
.whoform { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.who h2 { margin-bottom: 4px; }
.who .hint { margin: 0; }
.eating { margin: 0; font-size: .95rem; color: var(--muted); }
.eating strong { color: var(--ink); }
.eating.low strong { color: var(--red); }
.portion { margin: 0; font-size: .86rem; color: var(--muted); }
.fbline { margin: 0; font-size: .9rem; color: var(--green-d); font-weight: 600; }
.daynum.day { width: 44px; border-radius: 12px; font-size: .85rem; }
.meal .more .stack { gap: 10px; }
.meal .more .row label { flex-direction: column; align-items: flex-start; }
.meal .more select { min-width: 110px; }

.askcard { border-color: #ecd3a4; background: #fffaf0; }
.asklist { list-style: none; margin: 0; padding: 0; }
.asklist li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid #f0e2c4; }

a.card.person { text-decoration: none; color: var(--ink); }
a.card.person:hover { border-color: #c9c3b2; }
.person h2 { margin: 0 0 2px; }
.person .btn { align-self: flex-start; margin-top: auto; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.tagrow.big { margin-bottom: 14px; gap: 8px; }
.tg { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 12px; font-size: .9rem; font-weight: 600; background: var(--green-l); color: var(--green-d); border: 0; }
.tg.dislike { background: var(--red-l); color: var(--red); }
.tagrow.big .tg { font-size: 1rem; padding: 4px 4px 4px 14px; min-height: 40px; }
.tg button { background: none; border: 0; color: inherit; font-size: 1.3rem; line-height: 1; min-width: 36px; min-height: 36px; cursor: pointer; }
.tg.tap { cursor: pointer; min-height: 40px; font: 600 .95rem var(--font); background: #fff; border: 2px dashed currentColor; }
.tg.on { opacity: .8; }
.tgform { margin: 0; }
.grid2.gap { margin-top: 16px; }
.rt.loved { color: var(--green-d); font-weight: 700; }
.rt.no { color: var(--red); font-weight: 700; }

.picks { margin-bottom: 16px; }
.pick { align-items: flex-start; }
.rank { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green-l); color: var(--green-d); font-weight: 700; display: grid; place-items: center; }
.pickbtns { display: flex; gap: 8px; }
.why { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.why li { border-radius: 8px; padding: 3px 9px; font-size: .84rem; font-weight: 600; background: var(--bg); color: var(--muted); }
.why .w-good { background: var(--green-l); color: var(--green-d); }
.why .w-bad { background: var(--amber-l); color: #7a4406; }
.pad { padding: 16px; margin: 0; }
.sectitle { font-size: 1.5rem; margin-top: 28px; }
.sub.wide { max-width: 80ch; margin-bottom: 12px; }
details.plainmore { border-top: 0; padding-top: 0; }
.targetform label { flex-direction: row; align-items: center; gap: 8px; }

.fbform { display: grid; gap: 14px; }
.fbrow { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 0 0 14px; }
.fbrow legend { font-weight: 700; font-size: 1.1rem; padding: 0; margin-bottom: 8px; }
.fbrow.away legend { color: var(--muted); }
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rbtn { cursor: pointer; }
.rbtn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rbtn span { display: grid; place-items: center; min-height: 52px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-size: 1rem; font-weight: 700; text-align: center; }
.rbtn input:focus-visible + span { outline: 3px solid #8fc3a6; outline-offset: 2px; }
.r-loved input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.r-fine input:checked + span { background: var(--amber-l); border-color: var(--amber); color: #7a4406; }
.r-no input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.r-skip span { color: var(--muted); font-weight: 500; }
.r-skip input:checked + span { background: var(--bg); }
label.short { max-width: 220px; }
.btn.big { min-height: 52px; font-size: 1.05rem; padding: 10px 26px; }
.onetap { border-color: #b9d8c6; }
.tapline { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.afterhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }
.afterhead h2 { margin: 0; }

.status { flex: none; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 700; background: var(--bg); color: var(--muted); }
.s-sent { background: #e3ecf8; color: #24508a; }
.s-confirmed { background: var(--green-l); color: var(--green-d); }
.s-failed { background: var(--red-l); color: var(--red); }
.queue li { flex-wrap: wrap; }
.queue li .grow { min-width: 160px; }

@media (min-width: 720px) {
  .rate { max-width: 560px; }
}
@media (max-width: 480px) {
  .pick { flex-direction: row; }
  .pickbtns { width: 100%; }
  .pickbtns form, .pickbtns .btn { flex: 1; width: 100%; }
  .whoform .btn { width: 100%; }
  .asklist li form { flex: 1; }
  .asklist li .btn { width: 100%; }
  .asklist li .grow { flex-basis: 100%; }
  .afterhead { flex-direction: column; align-items: flex-start; }
}
/* Opened from the home screen on iPhone or iPad: keep clear of the status bar and the home indicator. */
@media (display-mode: standalone) {
  .top { padding-top: calc(12px + env(safe-area-inset-top)); }
  .logout { display: none; }
}

/* ---- Review round: make or buy choice, cost working, rule notes ---- */
.choice { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0 4px; }
.choice .hint { flex-basis: 100%; }
.worktable { font-size: .88rem; }
.worktable td, .worktable th { padding: 7px 6px; vertical-align: top; }
.recipe details.more { margin-top: 10px; }
.sl-meta strong { color: #7a4406; font-weight: 600; }
.ingform .f-var { grid-column: 1 / -1; }
@media (min-width: 720px) { .ingform .f-var { grid-column: span 2; } }

/* ---- Swap button and dual measures on every ingredient ---- */
.ticklist li.ingline { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 8px; }
.ingline .tick { min-width: 0; }
.dual { color: var(--muted); font-weight: 500; }
details.swap { margin: 8px 0; }
details.swap > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--green-d); font-weight: 700; font-size: .9rem; }
details.swap > summary::-webkit-details-marker { display: none; }
details.swap[open] { grid-column: 1 / -1; }
details.swap[open] > summary { background: var(--green-l); border-color: #b9d8c6; }
.swapbox { background: var(--bg); border-radius: 12px; padding: 12px; margin: 8px 0 4px; }
.swaphead { font-weight: 700; margin-bottom: 6px; }
.swapopt { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.swapopt .grow { min-width: 0; }
.swapnow { display: block; }
.was { display: block; color: #98a39d; text-decoration: line-through; font-size: .92em; }
.was strong { font-weight: 600; }
.ingline.swapped .tick em { text-decoration: none; }
@media (max-width: 480px) { .swapopt { flex-wrap: wrap; } .swapopt .btn { width: 100%; } }
@media print { details.swap { display: none; } }
/* Change password */
.pwcard { max-width: 520px; }
.pwform { display: grid; gap: 12px; }
.pwform .hint { margin: 0; }
.pwfacts { margin: 16px 0 0; padding-left: 20px; color: var(--muted); font-size: .9rem; display: grid; gap: 6px; }
/* Cost rule */
.tag.full { margin-left: 0; }
.fullrow td { background: var(--amber-l); }
.fullnote { color: #7a4406; }
.costrule { display: grid; gap: 10px; margin-bottom: 8px; }
label.check.opt { align-items: flex-start; }
label.check.opt input { width: 22px; height: 22px; min-height: 0; flex: none; padding: 0; margin: 2px 0 0; accent-color: var(--green); }
label.check.opt small { color: var(--muted); font-weight: 400; }
.rules.keeps li { font-weight: 500; padding: 8px 0; }
.rules.keeps .why { color: var(--muted); font-weight: 400; margin-left: 4px; }
.card h4 { margin: 14px 0 2px; font-size: .95rem; }
/* A wide table inside a recipe column scrolls in its own box instead of stretching the page. */
.recipe-cols > * { min-width: 0; }
@media (max-width: 480px) { .ingrow summary { flex-wrap: wrap; gap: 2px 12px; } .ingmeta { white-space: normal; text-align: left; } }
.rules.keeps .grow { min-width: 0; }
.rules.keeps form { flex: none; }
.rules.keeps .btn { white-space: nowrap; }
