/* Server-rendered site pages (/, /flavors…, /tovary…) in the app's dark «Lab» glass theme (tma/style.css):
   the same colours, glow, glass panels, gradient buttons and fonts as the web app; the page layouts stay as they were.
   A card page keeps the colour of its picture (--taste) only for the picture's frame. */
:root {
  --bg: #0A0E17; --text: #F0F4F8; --muted: #8B95A5; --soft: #C3CBD8;
  --accent: #00E676; --accent-2: #00E5FF;
  --glass: rgba(255, 255, 255, 0.055); --glass-strong: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.10); --stroke-strong: rgba(255, 255, 255, 0.18);
  --radius: 18px; --radius-sm: 12px;
  --taste: var(--accent); --taste-ink: #04110a;
  --display: Unbounded, Manrope, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: transparent; color: var(--text); font: 16px/1.6 Manrope, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; text-decoration: none; }
p a, .faq a { color: var(--accent); }
p a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* the app's ambient neon glow behind the glass */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #121a2b 0%, var(--bg) 60%); }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.backdrop i:nth-child(1) { width: 320px; height: 320px; background: #00c865; top: -120px; left: -90px; }
.backdrop i:nth-child(2) { width: 280px; height: 280px; background: #00a3ff; top: 35%; right: -140px; opacity: .32; }
.backdrop i:nth-child(3) { width: 260px; height: 260px; background: #b000f0; bottom: -120px; left: 10%; opacity: .25; }

/* glass surfaces: everything that was a thin-lined box */
.facts, .pair, .card, .list, .brands a, .panel, .pic, .more-pairs li {
  background: var(--glass); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
}

/* header: the app's web top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px;
  padding: 12px max(16px, calc((100% - 1200px) / 2 + 16px));
  background: rgba(10, 14, 23, .72); border-bottom: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
.logo { display: flex; align-items: center; gap: 10px; font: 700 17px/1 var(--display); margin-right: 6px; flex: none; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #00B8FF); color: #04120B; }
img.logo-mark { background: none; border-radius: 8px; }
/* the name in capitals, both parts the same size: the first in the icon's yellow, the second light */
.logo-text { text-transform: uppercase; letter-spacing: .02em; }
.logo-part:first-child { color: #FFD000; }
.logo-part + .logo-part { color: var(--text); }
.top nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { padding: 9px 14px; border-radius: 999px; color: #B7C0D3; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.top nav a:hover { color: var(--text); }
.top nav [aria-current] { color: #5CF2C2; background: rgba(0, 230, 118, .14); }
/* the web app lives apart from the site: one button in the header opens it */
.app-btn { flex: none; padding: 9px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; color: #04110a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 24px rgba(0, 230, 160, .25); }
.app-btn:hover { filter: brightness(1.08); }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
/* sign-in through Telegram: one account icon, sign-in and registration are the same step */
.auth-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--soft); border: 1px solid var(--stroke); }
.auth-icon:hover { color: var(--text); border-color: var(--stroke-strong); }

/* flavor and product page: title and facts on the left, the picture at the top of the side column */
.wrap.flavor { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "head pic" "main side"; row-gap: 0; padding-top: 26px; }
.wrap.flavor.nopic { grid-template-areas: "head side" "main side"; }
.flavor > .card-head { grid-area: head; }
.flavor > .pic { grid-area: pic; }
.flavor > main { grid-area: main; }
.flavor > aside { grid-area: side; }
.card-head h1 { font-size: 38px; }
.card-head .lead { margin-bottom: 22px; max-width: 62ch; }
.crumbs span { color: var(--text); }
.pic { margin: 0 0 14px; align-self: start; border-radius: var(--radius); overflow: hidden; border-color: color-mix(in srgb, var(--taste) 45%, var(--stroke));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28); }
.pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pic figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--stroke); color: var(--muted); font-size: 13px; }
.crumbs { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.crumbs a:hover { color: var(--text); }
.slug { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 6px; }
h1 { font: 700 40px/1.12 var(--display); margin: 0 0 12px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.lead { margin: 0; color: var(--soft); max-width: 50ch; }

/* body: content and a side column */
.wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; max-width: 1200px; margin: 0 auto; padding: 24px 16px 44px; }
.wrap.single { grid-template-columns: minmax(0, 1fr); }
.head { max-width: 1200px; margin: 0 auto; padding: 32px 16px 0; }
.head h1 { font-size: 36px; }
.head .lead { margin-bottom: 22px; max-width: 70ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-radius: var(--radius); margin-bottom: 30px; overflow: hidden; }
.facts > div { padding: 13px 16px; border-left: 1px solid var(--stroke); }
.facts > div:first-child { border-left: 0; }
.facts .key { background: linear-gradient(135deg, rgba(0, 230, 118, .14), rgba(0, 229, 255, .08)); }
.facts small { display: block; color: var(--muted); font-size: 12.5px; }
.facts b { font: 700 19px/1.4 var(--display); }
.facts .key b { color: #5CF2C2; }
h2 { font: 700 19px/1.3 var(--display); margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font-size: 16px; margin: 18px 0 4px; font-weight: 700; }
section { margin-bottom: 36px; }
section p { margin: 0 0 10px; max-width: 70ch; }

/* pictures in lists: pairs on a card page, cards in the catalog, on brand pages and the home page */
.pairs, .cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pairs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pair, .card { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
a.pair:hover, .card:hover { border-color: rgba(0, 230, 118, .45); transform: translateY(-2px); }
.pair img, .card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pair img { aspect-ratio: 16 / 10; }
.ph { display: grid; place-items: center; aspect-ratio: 16 / 10; background: rgba(255, 255, 255, .04); color: var(--muted); font-size: 13px; }
.pair .t, .card .t { display: block; padding: 11px 13px 13px; }
.card .t { border-top: 2px solid color-mix(in srgb, var(--taste) 70%, transparent); }
.card.bare .t { border-top: 0; }
.rest { margin-top: 34px; }
.cards.compact { gap: 8px; }
.cards.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.t .mono { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t strong { display: block; margin: 3px 0 2px; font-weight: 700; line-height: 1.3; }
.t > span:last-child { color: var(--muted); font-size: 13px; }

.more-pairs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.more-pairs li { border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.more-pairs a:hover { color: var(--accent); }
.more-pairs .mono { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* rows: recipes, products and shop offers */
.list { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); overflow: hidden; }
.list li + li { border-top: 1px solid var(--stroke); }
.list a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; transition: background .15s; }
.list a:hover { background: rgba(255, 255, 255, .04); }
.list a:hover > span:first-child { color: #5CF2C2; }
.list a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.list .mono { color: var(--soft); font-size: 13px; white-space: nowrap; }
.more { color: var(--accent); font-weight: 700; }

/* brands on the catalog and home pages */
.brands { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.brands a { display: flex; justify-content: space-between; gap: 10px; border-radius: var(--radius-sm); padding: 11px 14px; transition: border-color .15s; }
.brands a:hover { border-color: rgba(0, 230, 118, .45); }
.brands strong { font-weight: 700; }
.brands .mono { color: var(--muted); font-size: 13px; }

/* side column */
aside { align-self: start; position: sticky; top: 84px; }
.panel { display: block; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.panel small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.panel p { margin: 0; }
.price { font: 700 24px/1.3 var(--display); color: #5CF2C2; }
.brand { margin-top: 14px; } .brand strong { display: block; } .brand span { color: var(--muted); font-size: 13.5px; }
a.brand:hover, a.panel:hover { border-color: rgba(0, 230, 118, .45); }
.side-h { margin-top: 24px; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 14px; padding: 12px 16px; font-weight: 700;
  margin-bottom: 8px; border: 1px solid var(--stroke); background: var(--glass); text-align: center; transition: border-color .15s; }
.btn:hover { border-color: var(--stroke-strong); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #04110a; box-shadow: 0 8px 24px rgba(0, 230, 160, .25); }
.btn.primary:hover { filter: brightness(1.08); }

.pager { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 18px; }
.pager a { color: var(--accent); font-weight: 700; }

.foot { border-top: 1px solid var(--stroke); color: var(--muted); font-size: 13px; padding: 18px 16px 26px; text-align: center;
  background: rgba(10, 14, 23, .55); }
.foot p { margin: 4px auto; max-width: 80ch; }
.foot a { color: var(--soft); }
.foot a:hover { color: var(--text); }

@media (max-width: 1000px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .top { gap: 10px; padding: 10px 12px; }
  .logo > span:last-child { display: none; }
  .top nav a { padding: 8px 10px; font-size: 14px; }
  .app-btn { padding: 8px 12px; font-size: 13px; }
  .auth-icon { width: 34px; height: 34px; }
  .wrap.flavor { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "pic" "main" "side"; padding-top: 18px; }
  .wrap.flavor.nopic { grid-template-areas: "head" "main" "side"; }
  .card-head h1 { font-size: 28px; }
  .pic { margin-bottom: 26px; }
  h1, .head h1 { font-size: 28px; }
  .head { padding: 24px 16px 0; }
  .wrap { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 34px; gap: 8px; }
  aside { position: static; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(odd) { border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--stroke); }
  .pairs, .cards, .cards.cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list a { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* calculator form and guides (_calc.html, calculator.html, guide_zhizha.html) */
.calc { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > span { color: var(--muted); font-size: 13px; }
.calc input[type=number], .calc input[type=text] { width: 100%; min-width: 0; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .04); color: var(--text); font: 600 15px/1.2 Manrope, system-ui, sans-serif; }
.calc input:focus { outline: none; border-color: rgba(0, 230, 118, .55); box-shadow: 0 0 0 3px rgba(0, 230, 118, .14); }
.range-head { display: flex; justify-content: space-between; font-size: 14px; }
.range-head b { color: #5CF2C2; }
.calc input[type=range] { width: 100%; accent-color: var(--accent); }
.flavor-rows { display: flex; flex-direction: column; gap: 8px; }
.flavor-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 40px; gap: 8px; }
.flavor-row .x { border: 1px solid var(--stroke); border-radius: var(--radius-sm); background: var(--glass); color: var(--muted); font-size: 18px; cursor: pointer; }
.flavor-row .x:hover { color: var(--text); border-color: var(--stroke-strong); }
.link-btn { align-self: flex-start; border: 0; background: none; color: var(--accent); font: 700 14px Manrope, system-ui, sans-serif; padding: 4px 0; cursor: pointer; }
.calc .btn { margin: 4px 0 0; cursor: pointer; font: 700 15px Manrope, system-ui, sans-serif; }
.calc .btn:disabled { opacity: .6; cursor: progress; }
.form-error { margin: 0; color: #FF8A8E; font-size: 14px; }
.calc-result { padding: 16px 18px; }
.calc-result .btn { margin: 12px 0 0; }
.table-scroll { overflow-x: auto; }
table.mix { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.mix th, table.mix td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--stroke); }
table.mix th { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
table.mix tfoot td { font-weight: 700; border-bottom: 0; }
table.mix .mono { white-space: nowrap; }
.small { font-size: 13px; }
.steps, .bullets { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; max-width: 70ch; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.bullets li::marker { color: var(--accent); }
.faq h3 { font-size: 16px; margin: 18px 0 6px; }
@media (max-width: 860px) {
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .flavor-row { grid-template-columns: minmax(0, 1fr) 76px 40px; }
}
/* hub: tiles linking the topic's pages */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tiles .panel { height: 100%; margin: 0; transition: border-color .15s, transform .15s; }
.tiles .panel:hover { transform: translateY(-2px); }
.tiles strong { display: block; font: 700 17px/1.3 var(--display); margin: 2px 0 6px; }
.tiles p { color: var(--soft); font-size: 14.5px; }
@media (max-width: 860px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* recipe collections by taste: a recipe is a glass card with its composition and the button into the app */
.recipes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recipe { display: flex; flex-direction: column; height: 100%; margin: 0; }
.recipe h3 { font: 700 16px/1.35 var(--display); margin: 0 0 4px; overflow-wrap: anywhere; }
.recipe .meta { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.recipe ul { list-style: none; margin: 0 0 12px; padding: 0; flex: 1; font-size: 14.5px; }
.recipe li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--stroke); }
.recipe li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.recipe li a:hover { color: var(--accent); }
.recipe li.taste > :first-child { color: #5CF2C2; font-weight: 700; }
.recipe .mono { color: var(--soft); white-space: nowrap; }
.recipe .btn { margin: 0; }
.taste-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.taste-list a { display: inline-flex; gap: 8px; align-items: baseline; border-radius: 999px; padding: 8px 14px; font-weight: 700;
  background: var(--glass); border: 1px solid var(--stroke); transition: border-color .15s; }
.taste-list a:hover { border-color: rgba(0, 230, 118, .45); }
.taste-list .mono { color: var(--muted); font-size: 12px; font-weight: 400; }
@media (max-width: 860px) { .recipes { grid-template-columns: minmax(0, 1fr); } }
/* phone: logo and the buttons in the first row, the sections scroll in the second */
@media (max-width: 640px) {
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top-actions { margin-left: auto; }
  .top nav { order: 3; flex: 1 0 100%; }
}
