/*
  کالری‌نامه (۲۰ آبان ۱۴۰۵): طرحِ «ج» و «ط» از design/site-v2/ روی لایهٔ فاز ۱ (_Behino).

  ⚠️ همه‌چیز زیرِ .cal است. behino.css خودش .hero و details و h1 دارد و این فایل فقط روی سه صفحهٔ
  کالری‌نامه بار می‌شود؛ بی پیشوند، یا این‌جا آن‌ها را عوض می‌کرد یا آن‌ها این‌جا را.
  متغیرهای طرح به رنگ‌های behino.css نگاشت شده‌اند تا یک سبزِ برند بماند.
*/
.cal {
  --leaf: var(--primary);
  --leaf-deep: var(--primary-deep);
  --f-text: var(--font);
  --hair: #E3EAE6;
  --muted: #6B7C76;
  --tint: #EEF4F1;
  --stamp: #34459E;
  --ease: cubic-bezier(.2, .8, .2, 1);
  max-width: calc(1040px + 2 * var(--gutter));
  padding-bottom: 88px;
  font-size: 16.5px;
  line-height: 1.95;
}
.cal h1, .cal h2, .cal h3 { font-family: var(--f-text); letter-spacing: -.01em; }
.cal h2 { font-size: 1.35rem; font-weight: 800; line-height: 1.5; }
.cal p { margin: 0; }
.cal .num { font-variant-numeric: tabular-nums; }
.cal .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cal .sub { margin-top: 2px; color: var(--muted); font-size: .92rem; }
.cal .sec { margin-top: 88px; }
.cal .sec-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; margin-bottom: 24px; }
.cal :where(p, li, td) a:not(.btn) { color: var(--leaf-deep); text-decoration: none; }

/* ── بالای صفحه ── */
.cal-hero { position: relative; margin-top: 28px; padding: 48px 48px 44px; border-radius: 32px; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 0%, #E2F0EA 0%, #EEF4F1 45%, #F5F8F6 100%); box-shadow: inset 0 0 0 1px var(--hair); }
.cal-hero::after { content: ""; position: absolute; left: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, .14), transparent 62%); pointer-events: none; }
.cal .hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.cal .crumb { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); }
.cal .crumb a { color: inherit; text-decoration: none; }
.cal-hero h1 { margin: 14px 0 0; font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; line-height: 1.3; }
.cal-hero .lead { margin-top: 14px; max-width: 46ch; color: var(--muted); font-size: 1.04rem; }
.cal-hero .lead b { color: var(--ink); font-weight: 700; }

.cal .field { display: flex; align-items: center; gap: 12px; height: 62px; margin: 30px 0 0; padding: 0 20px; border-radius: 18px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -28px rgba(16, 52, 42, .35); transition: box-shadow .2s var(--ease); }
.cal .field:focus-within { box-shadow: 0 0 0 2px var(--leaf), 0 18px 40px -28px rgba(16, 52, 42, .35); }
.cal .field svg { flex: none; width: 22px; height: 22px; color: var(--muted); }
.cal .field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: 500 1.08rem var(--f-text); color: var(--ink); outline: none; }
.cal .field input::placeholder { color: #9AA9A3; }

.cal .hits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; min-height: 36px; }
.cal .hits button { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .75);
  box-shadow: inset 0 0 0 1px var(--hair); font: 600 .9rem var(--f-text); color: var(--ink); cursor: pointer; }
.cal .hits button small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.cal .hits button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.cal .hits button[aria-pressed="true"] small { color: #BFD0CA; }
.cal .hits .none { color: var(--muted); font-size: .92rem; }

/* کارتِ جوابِ زنده */
.cal .card { padding: 26px 26px 22px; border-radius: 24px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair), 0 30px 60px -36px rgba(16, 52, 42, .4); }
.cal .card[hidden] { display: none; }
.cal .card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cal .card-top b { font-size: 1.15rem; font-weight: 800; }
.cal .card-top span { color: var(--muted); font-size: .82rem; }
.cal .card .fig { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.cal .card .fig b { font-size: 4.2rem; font-weight: 700; line-height: .95; letter-spacing: -.02em; }
.cal .card .fig span { color: var(--muted); font-weight: 600; }
.cal .card .per { margin-top: 6px; color: var(--muted); font-size: .9rem; }
.cal .units { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 16px; padding: 4px; border-radius: 999px; background: var(--tint); width: fit-content; max-width: 100%; }
.cal .units button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font: 600 .86rem var(--f-text); color: var(--muted); cursor: pointer; }
.cal .units button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 52, 42, .14); }
.cal .mac { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); }
.cal .mac div + div { padding-inline-start: 14px; border-inline-start: 1px solid var(--hair); }
.cal .mac small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; }
.cal .mac small i { width: 7px; height: 7px; border-radius: 50%; }
.cal .mac b { display: block; margin-top: 2px; font-weight: 700; }
.cal .c-carb { background: #0E6B57; }
.cal .c-prot { background: #7FB7A4; }
.cal .c-fat { background: #F2A365; }
.cal .card .go { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hair); color: var(--leaf); font-weight: 700; font-size: .92rem; text-decoration: none; }
.cal .card .go svg { width: 18px; height: 18px; }

/* ── دسته‌ها ── */
.cal .tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.cal .tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--ink); text-decoration: none; transition: box-shadow .15s var(--ease), background-color .15s var(--ease); }
.cal .tile:hover { box-shadow: inset 0 0 0 1.5px #B9D3C9; color: var(--ink); }
.cal .tile .ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--tint); color: var(--leaf); }
.cal .tile .ic svg { width: 22px; height: 22px; }
.cal .tile b { display: block; font-size: .92rem; font-weight: 700; line-height: 1.5; }
.cal .tile small { color: var(--muted); font-size: .78rem; }
.cal .tile[aria-current="true"] { background: var(--leaf-deep); box-shadow: none; color: #fff; }
.cal .tile[aria-current="true"] .ic { background: rgba(255, 255, 255, .12); color: #9FE0C8; }
.cal .tile[aria-current="true"] small { color: #A9CDBF; }

.cal .table-wrap { margin-top: 18px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair); overflow: hidden; transition: opacity .15s var(--ease); }
.cal .table-wrap[aria-busy="true"] { opacity: .55; }
.cal .table-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 18px 22px; border-bottom: 1px solid var(--hair); }
.cal .table-h h3 { font-size: 1.1rem; font-weight: 800; }
.cal .table-h h3 small { margin-inline-start: 8px; color: var(--muted); font-size: .82rem; font-weight: 500; }
.cal .sort { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--tint); }
.cal .sort button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font: 600 .82rem var(--f-text); color: var(--muted); cursor: pointer; }
.cal .sort button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 52, 42, .14); }
.cal table { width: 100%; border-collapse: collapse; }
.cal th, .cal td { padding: 0 22px; height: 54px; text-align: start; border-bottom: 1px solid var(--hair); }
.cal tbody tr:last-child td { border-bottom: 0; }
.cal thead th { height: 42px; color: var(--muted); font-size: .8rem; font-weight: 600; background: #FAFCFB; }
.cal td.n, .cal th.n { text-align: left; font-variant-numeric: tabular-nums; }
.cal td a { color: var(--ink); font-weight: 600; text-decoration: none; }
.cal td a:hover { color: var(--leaf); }
.cal td .bar { display: inline-block; width: 64px; height: 5px; margin-inline-end: 10px; border-radius: 999px; background: var(--tint); vertical-align: middle; overflow: hidden; }
.cal td .bar i { display: block; height: 100%; border-radius: inherit; background: #9CC5B6; }
.cal td.k { font-weight: 700; }
.cal td.u { color: var(--muted); font-size: .9rem; }
.cal .table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--hair); color: var(--muted); font-size: .85rem; }
.cal .table-foot a { color: var(--leaf); font-weight: 700; text-decoration: none; }

/* ── کالریِ یک پرس ── */
.cal .meals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cal .meal { display: flex; flex-direction: column; padding: 20px 22px 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); text-decoration: none; transition: box-shadow .15s var(--ease); }
.cal .meal:hover { box-shadow: inset 0 0 0 1.5px #B9D3C9; color: var(--ink); }
.cal .meal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cal .meal-h > b { font-size: 1.02rem; font-weight: 800; line-height: 1.6; }
.cal .meal .tot { flex: none; text-align: left; color: var(--muted); font-size: .78rem; line-height: 1.2; }
.cal .meal .tot b { display: block; color: var(--leaf-deep); font-size: 1.6rem; font-weight: 800; }
.cal .meal ul { margin: 14px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--hair); }
.cal .meal li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; color: var(--muted); font-size: .88rem; }
.cal .meal li span:last-child { color: var(--ink); font-weight: 600; }

/* ── روش و پرسش‌ها ── */
.cal .how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.cal .how div { padding-top: 18px; border-top: 2px solid var(--ink); }
.cal .how b { display: block; font-weight: 800; }
.cal .how p { margin-top: 6px; color: var(--muted); font-size: .94rem; }
.cal .faq details { margin: 0; padding: 0; border-radius: 0; background: none; border-bottom: 1px solid var(--hair); }
.cal .faq details:first-child { border-top: 1px solid var(--hair); }
.cal .faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 0; font-weight: 600; cursor: pointer; list-style: none; }
.cal .faq summary::after { content: none; }
.cal .faq summary::-webkit-details-marker { display: none; }
.cal .faq summary svg { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .2s var(--ease); }
.cal .faq details[open] summary svg { transform: rotate(180deg); }
.cal .faq details p { margin: 0; padding-bottom: 20px; color: var(--muted); }

/* ── پلاس ── */
.cal .plus { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; margin-top: 88px; padding: 40px;
  border-radius: 28px; background: radial-gradient(120% 140% at 100% 0%, #13806A 0%, #0E6B57 38%, #0A4A3C 100%); color: #D6EAE2; }
.cal .plus::before { content: ""; position: absolute; left: -90px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 138, 61, .32), transparent 65%); }
.cal .plus > * { position: relative; }
.cal .plus-mark { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font-size: .82rem; font-weight: 700; }
.cal .plus-mark svg { width: 18px; height: 18px; }
.cal .plus h2 { margin-top: 16px; color: #fff; font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.45; }
.cal .plus p { margin-top: 10px; max-width: 46ch; font-size: .98rem; line-height: 1.9; }
.cal .plus ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.cal .plus li { display: flex; align-items: center; gap: 10px; font-size: .93rem; }
.cal .plus li svg { flex: none; width: 18px; height: 18px; color: #FFB27D; }
.cal .plus-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.cal .plus-cta .btn { min-height: 50px; padding: 0 28px; background: #fff; color: var(--leaf-deep); }
.cal .plus-cta small { color: #A9CDBF; font-size: .88rem; }
.cal .plan-sheet { position: relative; padding: 20px 20px 22px; border-radius: 6px 6px 18px 18px; background: #fff; color: var(--ink); transform: rotate(-2deg); box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .45); }
.cal .sheet-h { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); font-size: .8rem; color: var(--muted); }
.cal .sheet-h b { color: var(--ink); font-size: .95rem; }
.cal .sheet-row { display: grid; grid-template-columns: 62px 1fr auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: .84rem; line-height: 1.8; }
.cal .sheet-row span:first-child { color: var(--muted); font-weight: 600; }
.cal .sheet-row em { font-style: normal; font-weight: 700; }
.cal .sheet-row.me { background: linear-gradient(90deg, transparent, #FFEBDD 30%, #FFEBDD 70%, transparent); }
.cal .sheet-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 12px; min-height: 64px; }
.cal .sheet-foot small { color: var(--muted); font-size: .76rem; line-height: 1.7; }
.cal .sheet-foot small b { display: block; color: var(--ink); font-size: .82rem; }
.cal .plan-sheet .scrawl { width: 96px; height: 34px; }
.cal .plan-sheet .scrawl path { fill: none; stroke: var(--stamp); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cal .plan-sheet .stamp { position: absolute; left: 14px; bottom: 12px; width: 76px; height: 76px; color: var(--stamp); transform: rotate(-14deg); opacity: .85; }
.cal .plan-sheet .stamp text { font: 700 9.6px var(--f-text); fill: currentColor; }

/* ══ صفحهٔ دسته (calories-cat.html) ══ */
.cal .crumb-top { padding-top: 32px; }
.cal .crumb a:hover { color: var(--leaf); }
.cat-hero { position: relative; margin-top: 22px; padding: 40px 44px 0; border-radius: 30px; overflow: hidden;
  background: radial-gradient(90% 130% at 100% 0%, #E2F0EA 0%, #EEF4F1 45%, #F5F8F6 100%); box-shadow: inset 0 0 0 1px var(--hair); }
.cat-hero::after { content: ""; position: absolute; left: -110px; top: -140px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 138, 61, .12), transparent 62%); pointer-events: none; }
.cat-hero > * { position: relative; z-index: 1; }
.cal .head { display: flex; align-items: center; gap: 18px; }
.cal .head .ic { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--surface); color: var(--leaf); box-shadow: 0 0 0 1px var(--hair); }
.cal .head .ic svg { width: 32px; height: 32px; }
.cal .head h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); font-weight: 800; line-height: 1.3; }
.cat-hero .lead { margin-top: 18px; color: #4F625B; font-size: 1.06rem; line-height: 2; }
.cat-hero .lead a { font-weight: 600; }
.cal .facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 30px -44px 0; border-top: 1px solid var(--hair); background: rgba(255, 255, 255, .55); }
.cal .fact { display: block; padding: 18px 22px 20px; color: var(--ink); text-decoration: none; }
.cal .fact + .fact { border-inline-start: 1px solid var(--hair); }
.cal a.fact:hover { background: rgba(255, 255, 255, .8); color: var(--ink); }
.cal .fact small { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.cal .fact b { display: block; margin-top: 4px; font-size: 1.45rem; font-weight: 800; line-height: 1.3; }
.cal .fact b small { display: inline; margin-inline-start: 4px; font-size: .78rem; font-weight: 500; }
.cal .fact span { display: block; margin-top: 2px; font-size: .88rem; font-weight: 600; }

.cal .board { margin-top: 36px; border-radius: 22px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair), 0 24px 48px -36px rgba(16, 52, 42, .3); overflow: hidden; }
.cal .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 20px; border-bottom: 1px solid var(--hair); }
.cal .subs { display: flex; flex-wrap: wrap; gap: 6px; }
.cal .subs button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--tint); font: 600 .86rem var(--f-text); color: var(--ink); cursor: pointer; }
.cal .subs button small { margin-inline-start: 4px; color: var(--muted); font-weight: 500; }
.cal .subs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cal .subs button[aria-pressed="true"] small { color: #BFD0CA; }
.cal .find { display: flex; align-items: center; gap: 8px; height: 40px; margin-inline-start: auto; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair); min-width: 220px; }
.cal .find svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.cal .find input { flex: 1; min-width: 0; border: 0; background: none; font: 500 .92rem var(--f-text); color: var(--ink); outline: none; }
.cal .find:focus-within { box-shadow: inset 0 0 0 2px var(--leaf); }
.cal .board th, .cal .board td { padding: 0 16px; white-space: nowrap; }
.cal .board td:first-child, .cal .board th:first-child { padding-inline-start: 22px; white-space: normal; }
.cal .board td:last-child, .cal .board th:last-child { padding-inline-end: 22px; }
.cal .board thead th { height: 46px; }
.cal .board thead th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.cal .board thead th button svg { width: 14px; height: 14px; opacity: .4; }
.cal .board thead th[aria-sort] button { color: var(--ink); }
.cal .board thead th[aria-sort] button svg { opacity: 1; color: var(--leaf); }
.cal .board thead th[aria-sort="descending"] button svg { transform: rotate(180deg); }
.cal .board .n { text-align: left; font-variant-numeric: tabular-nums; }
.cal .board td.k { font-weight: 800; }
.cal .board td.k i { display: inline-block; width: 56px; height: 5px; margin-inline-end: 10px; border-radius: 999px; background: var(--tint); vertical-align: middle; overflow: hidden; }
.cal .board td.k i b { display: block; height: 100%; border-radius: inherit; background: #9CC5B6; }
.cal .board td.m { color: var(--muted); }
.cal .board tbody tr:hover td { background: #FAFCFB; }
.cal .board td.none { padding: 28px 22px; height: auto; color: var(--muted); white-space: normal; }
.cal .board-foot { padding: 14px 22px; border-top: 1px solid var(--hair); color: var(--muted); font-size: .84rem; }

.cal .picks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cal .pick { padding: 22px 22px 14px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.cal .pick h3 { font-size: 1.05rem; font-weight: 800; }
.cal .pick p { margin-top: 2px; color: var(--muted); font-size: .85rem; }
.cal .pick ol { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: r; }
.cal .pick li { display: flex; align-items: center; gap: 12px; min-height: 46px; border-top: 1px solid var(--hair); counter-increment: r; }
.cal .pick li::before { content: counter(r, persian); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--tint); color: var(--leaf-deep); font-size: .78rem; font-weight: 800; }
.cal .pick li a { flex: 1; color: var(--ink); font-weight: 600; text-decoration: none; }
.cal .pick li a:hover { color: var(--leaf); }
.cal .pick li span { font-weight: 700; }
.cal .pick li span small { margin-inline-start: 4px; color: var(--muted); font-weight: 500; font-size: .78rem; }

/*
  راهنمای دسته (حالتِ «د»ِ طرح): یک کارتِ سفید و یک ستونِ خوانا؛ بخش‌ها فقط با فاصله جدا می‌شوند.
  HTML از ContentMarkdown است، پس سرفصل‌ها h2/h3 با شمارهٔ .dot می‌آیند که این‌جا لازم نیست.
*/
.cal .g-rows { padding: 40px 48px 44px; border-radius: 24px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair); }
/* عرضِ ستون به rem و نه ch: ch به اندازهٔ قلمِ خودِ هر عنصر است و سرفصلِ درشت‌تر جلوتر از پاراگراف می‌نشست. */
.cal .g-rows > * { max-width: 42rem; margin-inline: auto; }
.cal .g-rows > :first-child { margin-top: 0; }
.cal .g-rows h2, .cal .g-rows h3 { margin: 36px auto 0; font-size: 1.12rem; font-weight: 800; line-height: 1.7; }
.cal .g-rows .dot { display: none; }
.cal .g-rows p { margin-top: 12px; color: #33463F; font-size: 1.02rem; line-height: 2.05; }
.cal .g-rows > p:first-child { color: var(--ink); font-size: 1.12rem; }
.cal .g-rows h2 + p, .cal .g-rows h3 + p { margin-top: 8px; }
.cal .g-rows ul, .cal .g-rows ol { margin-top: 12px; padding-inline-start: 1.2rem; color: #33463F; line-height: 2; }
.cal .g-rows li::marker { color: var(--leaf); }
.cal .g-rows a { color: var(--leaf-deep); font-weight: 600; text-decoration: none; }
.cal .g-rows a:hover { text-decoration: underline; text-decoration-color: rgba(14, 107, 87, .3); }

/* کادرها: :::tip / :::good / :::warn / :::myth از NamedBlockRenderer. همتای site.css برای مقاله‌ها. */
.cal .co { display: grid; grid-template-columns: 36px 1fr; gap: 2px 14px; margin-top: 20px; padding: 16px 20px 16px 18px; border-radius: 16px; background: var(--co-bg); }
.cal .co .co-ic { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--co-ic-bg); color: var(--co-ink); }
.cal .co .co-ic svg { width: 19px; height: 19px; }
.cal .co > b { align-self: end; color: var(--co-ink); font-size: .9rem; font-weight: 800; }
.cal .co .co-body > * { margin: 0; color: #33463F; font-size: .97rem; line-height: 1.95; }
.cal .co .co-body > * + * { margin-top: 6px; }
.cal .co-tip { --co-bg: #EEF4F1; --co-ic-bg: #DCEBE4; --co-ink: #0A4A3C; }
.cal .co-good { --co-bg: #EEF6EC; --co-ic-bg: #DBEDD6; --co-ink: #2F6B2A; }
.cal .co-warn { --co-bg: #FFF6E5; --co-ic-bg: #FCE8BF; --co-ink: #8A5A00; }
.cal .co-myth { --co-bg: #FBEFEE; --co-ic-bg: #F5DAD7; --co-ink: #9A2F25; }

/* :::compare از NamedBlockRenderer: نام، میله، مبنا و کالری، همه از کاتالوگ. همتای table.barchartِ site.css؛
   با .g-rows جلوتر از قاعده‌های جدولِ غذاهای همین صفحه (.cal th/td) می‌نشیند. */
.cal .g-rows .table-card { margin-top: 20px; padding: 20px 22px 16px; border-radius: 16px; background: var(--tint); }
.cal .g-rows .table-card :is(h3, h4) { margin: 0; font-size: 1rem; }
.cal .g-rows .table-card .sub { margin-top: 2px; color: var(--muted); font-size: .88rem; }
.cal .g-rows table.barchart { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: .95rem; }
.cal .g-rows table.barchart caption { caption-side: bottom; margin-top: 10px; color: var(--muted); font-size: .8rem; text-align: right; }
.cal .g-rows table.barchart th { height: auto; padding: 0 0 8px; background: none; color: var(--muted); font-size: .78rem; font-weight: 600; text-align: right; }
.cal .g-rows table.barchart td { height: auto; padding: 8px 0; border: 0; vertical-align: middle; }
.cal .g-rows table.barchart td + td, .cal .g-rows table.barchart th + th { padding-inline-start: 14px; }
.cal .g-rows table.barchart .name { width: 30%; white-space: nowrap; }
.cal .g-rows table.barchart td:nth-child(2) { width: 100%; }
.cal .g-rows table.barchart .track { display: block; height: 10px; border-radius: 4px; background: var(--surface); }
.cal .g-rows table.barchart .fill { display: block; width: var(--w); height: 100%; border-radius: 4px; background: var(--leaf); }
.cal .g-rows table.barchart td:nth-child(3) { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.cal .g-rows table.barchart .v { width: 6ch; color: var(--ink); font-weight: 800; text-align: left; }
.cal .g-rows table.barchart .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .cal .g-rows table.barchart thead { display: none; }
  .cal .g-rows table.barchart tr { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 12px; padding-block: 10px; border-top: 1px solid var(--hair); }
  .cal .g-rows table.barchart td { padding: 0; }
  .cal .g-rows table.barchart td + td { padding-inline-start: 0; }
  .cal .g-rows table.barchart .name { grid-column: 1 / -1; width: auto; white-space: normal; }
  .cal .g-rows table.barchart .v { width: auto; }
}

.cal .others { display: flex; flex-wrap: wrap; gap: 8px; }
.cal .others a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; }
.cal .others a:hover { box-shadow: inset 0 0 0 1.5px #B9D3C9; color: var(--ink); }
.cal .others a svg { width: 18px; height: 18px; color: var(--leaf); }
.cal .others a small { color: var(--muted); font-weight: 500; }

/* ══ صفحهٔ غذا (food-i.html، طرحِ «ط») ══ */
.cal.food { max-width: calc(880px + 2 * var(--gutter)); }
.cal.food .sec { margin-top: 72px; }
.cal.food h2 { font-size: 1.25rem; }
.cal .intro { margin-top: 20px; }
.cal .pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 14px; border-radius: 999px; background: var(--tint); color: var(--leaf-deep); font-size: .82rem; font-weight: 700; }
.cal .pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); }
.cal .intro h1 { margin-top: 14px; font-size: clamp(1.75rem, 3.8vw, 2.4rem); font-weight: 800; line-height: 1.4; }
.cal .intro p { margin-top: 10px; max-width: 62ch; color: var(--muted); }
.cal .intro p b { color: var(--ink); font-weight: 700; }
.cal .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cal .tags span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--tint); color: var(--ink); font-size: .88rem; font-weight: 600; }
.cal .tags svg { width: 17px; height: 17px; flex: none; color: var(--leaf); }

.cal .answer { margin-top: 32px; padding: 36px 36px 30px; border-radius: 24px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--hair), 0 1px 2px rgba(16, 52, 42, .04), 0 24px 48px -32px rgba(16, 52, 42, .3); }
.cal .answer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.cal .figure { display: flex; align-items: baseline; gap: 14px; }
.cal .figure b { font-size: clamp(4.2rem, 9.5vw, 5.6rem); font-weight: 700; line-height: .9; letter-spacing: -.02em; }
.cal .figure span { font-size: 1.05rem; font-weight: 600; color: var(--muted); }
.cal .figure-note { margin-top: 12px; color: var(--muted); font-size: .92rem; }
.cal .controls { display: grid; gap: 12px; justify-items: end; }
.cal .seg { display: inline-flex; flex-wrap: wrap; padding: 4px; border-radius: 999px; background: var(--tint); }
.cal .seg button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font: 600 .92rem var(--f-text); color: var(--muted); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.cal .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 52, 42, .14); }
.cal .stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair); }
.cal .stepper button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.cal .stepper button:hover { background: var(--tint); }
.cal .stepper button svg { width: 18px; height: 18px; margin: auto; }
.cal .stepper output { min-width: 4.5ch; text-align: center; font-weight: 700; }
.cal .macros { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--hair); }
.cal .macro + .macro { padding-inline-start: 24px; border-inline-start: 1px solid var(--hair); }
.cal .macro small { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; }
.cal .macro small i { width: 8px; height: 8px; border-radius: 50%; }
.cal .macro b { display: block; margin-top: 4px; font-size: 1.2rem; font-weight: 700; }
.cal .macro b small { display: inline; margin-inline-start: 4px; font-weight: 500; }
.cal .macro b.missing { color: var(--muted); font-size: .9rem; font-weight: 600; line-height: 2.2; }
.cal .split { display: flex; gap: 3px; height: 4px; margin-top: 22px; border-radius: 999px; overflow: hidden; }
.cal .split i { display: block; border-radius: 999px; }
.cal .c-fiber { background: #B9C8C2; }

.cal .rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hair); }
.cal .rows li { display: flex; align-items: center; gap: 16px; min-height: 58px; border-bottom: 1px solid var(--hair); }
.cal .rows .name { flex: 1; font-weight: 600; }
.cal .rows .name small { margin-inline-start: 8px; color: var(--muted); font-weight: 400; font-size: .85rem; }
.cal .rows .val { font-weight: 700; }
.cal .rows .val small { margin-inline-start: 4px; color: var(--muted); font-weight: 400; font-size: .82rem; }
.cal .rows a { color: var(--ink); text-decoration: none; }
.cal .rows a:hover { color: var(--leaf); }

.cal .weight { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .88rem; }
.cal .weight output { min-width: 5.5ch; color: var(--ink); font-weight: 700; }
.cal .weight input { width: 180px; accent-color: var(--leaf); }
.cal .burn { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair); overflow: hidden; }
.cal .act { display: flex; align-items: center; gap: 14px; padding: 22px; box-shadow: -1px 0 0 var(--hair), 0 -1px 0 var(--hair); }
.cal .act .ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--leaf); }
.cal .act .ic svg { width: 21px; height: 21px; }
.cal .act b { display: block; font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.cal .act b small { margin-inline-start: 5px; font-size: .82rem; font-weight: 500; color: var(--muted); }
.cal .act span { display: block; color: var(--muted); font-size: .85rem; }

.cal .fam .bar { width: 120px; height: 6px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.cal .fam .bar i { display: block; height: 100%; border-radius: inherit; background: #9CC5B6; }
.cal .fam li.me .bar i { background: #FF8A3D; }
.cal .fam li.me .name { font-weight: 800; }
.cal .fam .diff { width: 4.5rem; text-align: left; font-size: .85rem; color: var(--muted); }
.cal.food .plus { margin-top: 72px; }

@media (max-width: 720px) {
  .cal .answer { padding: 26px 20px 22px; }
  .cal .controls { justify-items: start; width: 100%; }
  .cal .macros { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .cal .macro + .macro { padding-inline-start: 14px; }
  .cal .macro:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .cal .burn { grid-template-columns: repeat(2, 1fr); }
  .cal .act { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 16px; }
  .cal .fam .bar { width: 60px; }
  .cal .weight { width: 100%; }
  .cal .weight input { flex: 1; width: auto; }
}

@media (max-width: 720px) {
  .cal .g-rows { margin-inline: -8px; padding: 26px 20px 30px; border-radius: 20px; }
  .cal .co { padding: 14px 14px 14px 12px; gap: 2px 12px; }
  .cat-hero { margin-inline: -8px; padding: 26px 20px 0; border-radius: 24px; }
  .cal .head .ic { width: 52px; height: 52px; border-radius: 16px; }
  .cal .head .ic svg { width: 26px; height: 26px; }
  .cal .facts { grid-template-columns: 1fr 1fr; margin: 24px -20px 0; }
  .cal .fact:nth-child(3) { border-inline-start: 0; }
  .cal .fact:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .cal .fact { padding: 14px 16px 16px; }
  .cal .board { margin-inline: -8px; }
  .cal .tools { padding: 14px; }
  .cal .find { width: 100%; margin-inline-start: 0; }
  .cal .subs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .cal .subs button { flex: none; }
  .cal .board .col-m, .cal .board td.k i { display: none; }
  .cal .board th, .cal .board td { padding: 0 10px; }
  .cal .board td:first-child, .cal .board th:first-child { padding-inline-start: 14px; }
  .cal .board td:last-child, .cal .board th:last-child { padding-inline-end: 14px; }
  .cal .picks { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .cal .meals { grid-template-columns: 1fr 1fr; }
  .cal .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .cal .tiles { grid-template-columns: repeat(3, 1fr); }
  .cal .plus { grid-template-columns: 1fr; padding: 28px 22px; }
  .cal .plus .plan-wrap { width: 100%; max-width: 320px; margin: 8px auto 4px; }
}
@media (max-width: 640px) {
  .cal-hero { margin-inline: -8px; padding: 28px 18px 22px; border-radius: 26px; }
  .cal .field { height: 56px; padding: 0 16px; }
  .cal .card { padding: 22px 18px 18px; }
  .cal .card .fig b { font-size: 3.4rem; }
  .cal .tiles { display: flex; overflow-x: auto; gap: 8px; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cal .tile { flex: none; flex-direction: column; align-items: flex-start; gap: 8px; width: 116px; padding: 12px; scroll-snap-align: start; }
  .cal .tile .ic { width: 38px; height: 38px; }
  .cal th, .cal td { padding: 0 14px; }
  .cal .col-100, .cal td .bar, .cal td.u .num { display: none; }
  .cal .meals { grid-template-columns: 1fr; }
  .cal .how { grid-template-columns: 1fr; gap: 24px; }
}
