/* Plate Mate — блог и Real Food (страницы собирает tools/blog/build.js). Общие стили — brand.css. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.b-main { padding-bottom: 72px; }
.b-main h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
html[lang="th"] .b-main h1 { line-height: 1.3; letter-spacing: 0; }
.b-kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #4f6a00; margin-bottom: 10px; }
.b-kicker a { color: inherit; text-decoration: none; display: inline-block; padding: 12px 0; margin: -12px 0; }
html[lang="th"] .b-kicker { text-transform: none; letter-spacing: 0; font-size: 15px; }
.b-lead { font-size: clamp(17px, 1.8vw, 20px); color: var(--graphite); margin-top: 14px; max-width: 62ch; }
.b-h { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin: 48px 0 14px; }
.b-sub { color: var(--graphite); margin: -6px 0 18px; }

/* хлебные крошки */
.b-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 22px 0 18px; font-size: 13px; color: var(--graphite); }
.b-crumbs li + li::before { content: "›"; margin-right: 8px; color: #999; }
.b-crumbs a { color: var(--graphite); display: inline-block; padding: 11px 7px; margin: -11px -7px; }

/* главная блога */
.b-hero { background: var(--white); padding: 4px 0 34px; border-bottom: 1px solid #efe4d8; }
.b-hero--cat { background: var(--petal); border: 0; }
.b-search { position: relative; max-width: 620px; margin-top: 22px; }
.b-search input { width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 999px; border: 1.5px solid #d9d2c9; font: inherit; font-size: 16px; background: var(--white); }
.b-search input:focus { outline: none; border-color: var(--green); }
.b-search input { text-overflow: ellipsis; }
@media (max-width: 599px) { .b-search input::placeholder { font-size: 14.5px; } }
.b-search__results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); background: var(--white); border-radius: 16px; box-shadow: 0 14px 30px rgba(0,0,0,.14); padding: 6px; }
.b-search__results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; color: var(--black); text-decoration: none; }
.b-search__results a:hover { background: var(--petal); }
.b-search__results span { font-size: 13px; color: var(--graphite); }
.b-search__empty { padding: 10px 14px; color: var(--graphite); }
.b-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 6px; }
.b-topics a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--white); color: var(--black); font-weight: 700; font-size: 14px; text-decoration: none; border: 1.5px solid transparent; }
.b-topics a small { color: #767676; font-weight: 600; font-size: 12.5px; }
/* телефон: рубрики одной прокручиваемой строкой, а не столбиком из 7 строк; край затухает — видно, что есть ещё */
@media (max-width: 599px) {
  .b-topics { flex-wrap: nowrap; overflow-x: auto; margin: 22px -16px 6px; padding: 2px 16px 8px; scroll-padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); }
  .b-topics::-webkit-scrollbar { display: none; }
  .b-topics a { flex: none; min-height: 42px; white-space: nowrap; }
}
.b-topics a[aria-current="page"] { background: var(--black); color: var(--white); }
.b-topics a[aria-current="page"] small { color: #bbb; }
.b-topics__rf { border-color: var(--green) !important; }

/* карточки */
.b-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.b-card { position: relative; background: var(--white); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.b-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.b-card__meta a { position: relative; z-index: 2; display: inline-block; padding: 12px 4px; margin: -12px -4px; }
.b-card:hover h3 a { color: #4f6a00; }
.b-card__img { position: relative; }
.b-card--light .b-card__img::after { content: ""; position: absolute; inset: 0; border: 1.5px solid #efd9c6; border-bottom: 0; border-radius: 18px 18px 0 0; pointer-events: none; }
.b-card__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #f3ebe2; }
.b-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.b-card__meta { font-size: 12.5px; color: #6b6b6b; font-weight: 600; }
.b-card__meta a { color: #4f6a00; text-decoration: none; }
.b-card h3 { font-size: 18px; font-weight: 800; line-height: 1.25; }
.b-card h3 a { color: var(--black); text-decoration: none; }
.b-card h3 a:hover { color: #4f6a00; }
.b-card p:last-child { color: var(--graphite); font-size: 15px; }
.b-card--big { display: grid; }
@media (min-width: 860px) { .b-card--big { grid-template-columns: 1.2fr 1fr; } .b-card--big .b-card__img { aspect-ratio: auto; min-height: 320px; } .b-card--big .b-card__body { padding: 28px 30px; justify-content: center; } .b-card--big h3 { font-size: 28px; } }
.b-rf { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; border-radius: 20px; background: var(--green); }
.b-rf .b-kicker { color: #1f2a00; margin: 0 0 4px; }
.b-rf__t { font-size: 20px; font-weight: 800; max-width: 46ch; }
.b-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.b-pager a, .b-pager span { min-width: 42px; min-height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--white); color: var(--black); font-weight: 700; text-decoration: none; }
.b-pager span { background: var(--black); color: var(--white); }

/* статья */
.b-head { max-width: 820px; }
.b-meta { margin-top: 16px; font-size: 14px; color: #6b6b6b; }
.b-cover { margin: 26px 0 0; }
.b-cover img { display: block; width: 100%; height: auto; max-height: 520px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; background: #f3ebe2; }
.b-cover--light img { outline: 1.5px solid #efd9c6; outline-offset: -1.5px; }
/* фирменные иллюстрации и сцены 16:9 показываем целиком: обрезка по высоте срезала бы полосу и сурикат */
.b-cover--art img { max-height: none; }
.b-cover figcaption { font-size: 12.5px; color: #8a8a8a; margin-top: 6px; }
.b-layout { display: grid; gap: 24px; margin-top: 30px; }
@media (min-width: 960px) { .b-layout { grid-template-columns: 250px minmax(0, 760px); gap: 48px; } .b-side { position: sticky; top: calc(var(--header-h) + 18px); align-self: start; } }
.b-layout > * { min-width: 0; }
.b-toc { background: var(--white); border-radius: 16px; padding: 4px 18px; }
.b-toc summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; color: var(--graphite); list-style: none; }
.b-toc summary::-webkit-details-marker { display: none; }
.b-toc summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.b-toc[open] summary::after { transform: translateY(1px) rotate(225deg); }
html[lang="th"] .b-toc summary { text-transform: none; letter-spacing: 0; }
.b-toc ol { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 0; font-size: 14px; line-height: 1.4; border-top: 1px solid #f0e7de; }
.b-toc a { display: block; padding: 6px 0; color: var(--black); text-decoration: none; }
@media (max-width: 959px) { .b-toc a { padding: 11px 0; } .b-toc li + li { border-top: 1px solid #f6efe8; } }
.b-toc a:hover { color: #4f6a00; text-decoration: underline; }
.b-body { background: var(--white); border-radius: 22px; padding: 24px 20px; font-size: 17.5px; line-height: 1.72; color: #1b1b1b; overflow-wrap: anywhere; }
@media (min-width: 768px) { .b-body { padding: 40px 48px; } }
html[lang="th"] .b-body { line-height: 1.85; }
.b-body > :first-child { margin-top: 0; }
.b-body h2 { font-size: 26px; font-weight: 800; line-height: 1.25; margin: 42px 0 12px; scroll-margin-top: calc(var(--header-h) + 16px); }
.b-body h3 { font-size: 20px; font-weight: 800; margin: 28px 0 8px; scroll-margin-top: calc(var(--header-h) + 16px); }
.b-body p, .b-body ul, .b-body ol { margin: 0 0 16px; }
.b-body ul, .b-body ol { padding-left: 24px; }
.b-body li + li { margin-top: 6px; }
.b-body a { color: #3d5a00; font-weight: 600; text-underline-offset: 3px; }
.b-body code { background: #f5efe9; padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.b-note { margin: 22px 0; padding: 16px 20px; border-radius: 14px; background: #f1f7e3; border-left: 4px solid var(--green); font-size: 16px; }
.b-note p:last-child { margin-bottom: 0; }
.b-table { margin: 22px 0; overflow-x: auto; border-radius: 14px; border: 1px solid #ece2d8; overflow-wrap: normal; word-break: normal;
  background: linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left / 32px 100% no-repeat local, linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.16), transparent) left / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.16), transparent) right / 12px 100% no-repeat scroll, #fff; }
.b-table table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.b-table th, .b-table td { min-width: 8em; padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #f0e7de; }
.b-table th:empty { min-width: 6em; }
html[lang="th"] .b-table th, html[lang="th"] .b-table td { min-width: 7em; }
.b-table th { background: #f7efe8; font-weight: 800; }
.b-table tr:last-child td { border-bottom: 0; }
/* схемы внутри статей: <figure class="b-fig"> <svg/HTML> <figcaption> */
.b-fig { margin: 26px 0; padding: 18px; border-radius: 18px; background: var(--petal); }
.b-fig svg { display: block; width: 100%; height: auto; }
.b-fig ol { margin: 0; }
@media (max-width: 699px) {
  .b-fig { padding: 12px; margin-left: -8px; margin-right: -8px; }
  .b-fig--zoomable { position: relative; cursor: zoom-in; }
  .b-fig__zoom { margin: 8px 0 -2px auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--black); color: var(--white); display: grid; place-items: center; cursor: pointer; }
  .b-fig__zoom svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .b-fig--zoom { cursor: zoom-out; }
  .b-fig--zoom .b-fig__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -12px; padding: 0 12px; }
  .b-fig--zoom .b-fig__scroll > svg { width: 640px; max-width: none; }
}
@media (min-width: 700px) { .b-fig__zoom { display: none; } }
.b-fig figcaption { font-size: 14px; color: var(--graphite); margin-top: 10px; line-height: 1.5; }
.b-steps { list-style: none; padding: 0 !important; display: grid; gap: 10px; counter-reset: st; }
/* не grid: в grid текст после <strong> становился отдельной ячейкой шириной 36px — по слову в строке */
.b-steps li { counter-increment: st; position: relative; background: var(--petal); border-radius: 14px; padding: 12px 14px 12px 60px; margin: 0 !important; }
.b-steps li::before { content: counter(st); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--black); color: var(--green); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.b-dish { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; margin: 22px 0; padding: 14px; border-radius: 18px; background: #111; color: var(--white); line-height: 1.4; }
.b-dish picture { display: block; }
.b-dish img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; display: block; }
.b-dish p { margin: 0 0 4px !important; }
.b-dish__name { font-weight: 800; font-size: 17px; line-height: 1.3; margin-bottom: 6px !important; }
.b-dish__nums { color: var(--green); font-size: 15px; }
.b-dish__note { color: #a8a8a8; font-size: 12.5px; line-height: 1.4; }
.b-dish a { color: var(--orange) !important; font-size: 14px; display: inline-block; padding: 11px 0; margin-bottom: -6px; }
@media (max-width: 359px) { .b-dish { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; } .b-dish img { width: 88px; height: 88px; } }
.b-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin: 34px 0 10px; padding: 20px 22px; border-radius: 18px; background: var(--green); line-height: 1.45; }
.b-cta p { margin: 0 !important; font-size: 15.5px; }
.b-cta__t { font-weight: 800; font-size: 18px !important; }
.b-cta .btn { color: var(--white) !important; text-decoration: none; }
.b-cta--buildings { background: var(--sky); }
.b-cta--residents { background: var(--petal); border: 1.5px solid var(--green); }
.b-sources { margin-top: 30px; padding-top: 18px; border-top: 1px solid #efe4d8; font-size: 14.5px; line-height: 1.55; }
.b-sources h2 { font-size: 18px; margin: 0 0 10px; }
.b-sources a { word-break: break-word; }
.b-sources ol { padding-left: 22px; }
.b-sources li + li { margin-top: 8px; }
.b-sources__d { white-space: nowrap; }
.b-related { margin-top: 40px; }
.b-related h2 { font-size: 24px; font-weight: 800; margin-bottom: 14px; }
@media (max-width: 599px) {
  .b-related .b-grid { gap: 10px; }
  .b-related .b-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .b-related .b-card__img { aspect-ratio: auto; min-height: 104px; height: 100%; }
  .b-related .b-card--light .b-card__img::after { border-radius: 18px 0 0 18px; border: 1.5px solid #efd9c6; border-right: 0; }
  .b-related .b-card__body { padding: 12px 14px; gap: 4px; justify-content: center; }
  .b-related .b-card h3 { font-size: 16px; }
  .b-related .b-card__body > p:last-child { display: none; }
}
.b-back { margin-top: 26px; font-weight: 700; }
.b-back a { color: var(--black); display: inline-block; padding: 10px 0; }

/* Real Food */
.rf-hero { background: var(--white); padding-bottom: 40px; }
.rf-hero__in { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .rf-hero__in { grid-template-columns: 1.3fr .9fr; gap: 48px; } }
.rf-hero__img, .rf-p__img { margin: 0; }
.rf-hero__img img { display: block; width: 100%; height: auto; border-radius: 22px; margin-top: 22px; max-height: 560px; object-fit: cover; }
.rf-def { margin-top: 22px; padding: 18px 20px; border-radius: 16px; background: var(--petal); border-left: 4px solid var(--orange); }
.rf-def__t { font-weight: 800; margin-bottom: 6px; }
.rf-def__note { font-size: 14px; color: var(--graphite); margin-top: 8px; }
.rf-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.rf-grid a { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 18px; border-radius: 18px; background: var(--white); color: var(--black); text-decoration: none; transition: transform .15s ease; }
.rf-grid a:hover { transform: translateY(-2px); }
.rf-grid b { font-size: 17px; line-height: 1.25; }
.rf-grid span:not(.rf-num):not(.ic):not(.rf-badge) { color: var(--graphite); font-size: 14.5px; }
.rf-grid .rf-num { position: absolute; top: 14px; right: 16px; }
.rf-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--black); color: var(--green); font-weight: 800; font-size: 14px; flex: none; }
.rf-grid .rf-badge { margin-top: auto; }
.rf-badge { align-self: flex-start; display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.rf-badge--confirmed { background: #e7f2cc; color: #3d5a00; }
.rf-badge--goal { background: #fde6c9; color: #8a4a00; }
.rf-badge--mixed { background: #e3eef4; color: #1f4a60; }
.rf-p { margin-top: 26px; background: var(--white); border-radius: 22px; padding: 22px 20px; scroll-margin-top: 4px; } /* html уже даёт scroll-padding-top под шапку — не удваиваем */
@media (min-width: 768px) { .rf-p { padding: 30px 36px; } }
.rf-p__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.rf-p__head h2 { font-size: 24px; font-weight: 800; }
.rf-p__body { margin-top: 12px; display: grid; gap: 14px; font-size: 16.5px; line-height: 1.65; }
.rf-p__text { display: contents; }
.rf-p__links { order: 1; }
@media (min-width: 900px) {
  .rf-p__body--img { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); column-gap: 40px; align-items: start; }
  .rf-p__text { display: grid; gap: 14px; align-content: start; }
  .rf-p__body--img .rf-p__img img { max-width: none; }
  .rf-p__body:not(.rf-p__body--img) .rf-p__text { max-width: 760px; }
}
.rf-p__body dl { display: grid; gap: 8px; margin: 0; }
.rf-p__body dt { font-weight: 800; font-size: 14px; color: #4f6a00; text-transform: uppercase; letter-spacing: .05em; }
html[lang="th"] .rf-p__body dt { text-transform: none; letter-spacing: 0; }
.rf-p__body dd { margin: 0 0 6px; }
.rf-p__img img { width: 100%; max-width: 420px; height: auto; border-radius: 16px; display: block; }
.rf-p__links p { font-weight: 800; margin-bottom: 4px; }
.rf-p__links ul { margin: 0; padding-left: 20px; }
.rf-p__links li + li { margin-top: 2px; }
.rf-p__links a { color: #3d5a00; font-weight: 600; display: inline-block; padding: 7px 0; } /* удобная зона нажатия на телефоне */
@media (min-width: 900px) and (hover: hover) { .rf-p__links a { padding: 3px 0; } }
.rf-faq details { background: var(--white); border-radius: 16px; margin-top: 10px; }
.rf-faq summary { padding: 16px 20px; font-weight: 700; font-size: 17px; cursor: pointer; }
.rf-faq details p { padding: 0 20px 18px; color: var(--graphite); }
.rf-cta { margin-top: 30px; }
/* рубрика: карточки не прилипают к строке рубрик */
.b-topics + .b-grid { margin-top: 22px; }
@media (max-width: 599px) { .b-topics + .b-grid { margin-top: 12px; } }
/* Real Food на телефоне: номер и заголовок принципа в одной строке, статус — под заголовком (а не «3» отдельной строкой) */
@media (max-width: 599px) {
  .rf-p__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px 12px; }
  .rf-p__head .rf-num { margin-top: 1px; }
  .rf-p__head h2 { font-size: 22px; line-height: 1.25; }
  .rf-p__head .rf-badge { grid-column: 2; justify-self: start; }
}
/* Real Food на телефоне: карточки принципов компактнее — иконка слева, текст справа (8 карточек не растягиваются на 1500px) */
@media (max-width: 599px) {
  .rf-grid { gap: 10px; }
  .rf-grid a { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-content: start; padding: 16px 52px 16px 16px; }
  .rf-grid .ic--ring { grid-row: 1 / span 3; width: 44px; height: 44px; padding: 10px; }
  .rf-grid .rf-badge { margin-top: 4px; justify-self: start; }
}
