/* ============================================================
   Тарелка — стили
   ============================================================ */

:root {
  --bg: #070f0c;
  --bg-2: #0b1712;
  --text: #eef7f1;
  --text-soft: #c9dad1;
  --muted: #90a89d;
  --stroke: rgba(255, 255, 255, .09);
  --stroke-strong: rgba(255, 255, 255, .16);
  --hover: rgba(255, 255, 255, .055);
  --panel: linear-gradient(155deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  --panel-solid: #0c1813;
  --header-bg: rgba(7, 15, 12, .74);

  --accent: #b7f26b;
  --accent-2: #34e0a4;
  --accent-ink: #08130c;
  --accent-soft: rgba(183, 242, 107, .12);
  --accent-line: rgba(183, 242, 107, .28);
  --accent-glow: rgba(183, 242, 107, .22);

  --good: #4ee39a;
  --good-soft: rgba(78, 227, 154, .11);
  --warn: #ffc861;
  --warn-soft: rgba(255, 200, 97, .11);
  --danger: #ff8181;
  --danger-soft: rgba(255, 129, 129, .11);
  --violet: #b9a4ff;
  --violet-soft: rgba(185, 164, 255, .11);

  --grad: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  --shadow-lg: 0 40px 100px -45px rgba(0, 0, 0, .85);
  --shadow-sm: 0 20px 50px -32px rgba(0, 0, 0, .7);

  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;

  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Manrope', -apple-system, sans-serif;
  --max: 1240px;
}

html[data-theme="dark"] { color-scheme: dark; }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6ef;
  --bg-2: #ffffff;
  --text: #0d1b14;
  --text-soft: #31463b;
  --muted: #566b60;
  --stroke: rgba(13, 27, 20, .1);
  --stroke-strong: rgba(13, 27, 20, .18);
  --hover: rgba(13, 27, 20, .045);
  --panel: linear-gradient(155deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .84));
  --panel-solid: #ffffff;
  --header-bg: rgba(244, 246, 239, .85);

  --accent: #276d31;
  --accent-2: #0a7259;
  --accent-ink: #ffffff;
  --accent-soft: rgba(39, 109, 49, .09);
  --accent-line: rgba(39, 109, 49, .28);
  --accent-glow: rgba(39, 109, 49, .2);

  --good: #117a4b;
  --good-soft: rgba(17, 122, 75, .09);
  --warn: #8a5a00;
  --warn-soft: rgba(138, 90, 0, .1);
  --danger: #b83232;
  --danger-soft: rgba(184, 50, 50, .08);
  --violet: #5a43b8;
  --violet-soft: rgba(90, 67, 184, .09);

  --grad: linear-gradient(100deg, #276d31 0%, #0a7259 100%);
  --shadow-lg: 0 40px 90px -50px rgba(20, 50, 35, .35);
  --shadow-sm: 0 20px 46px -32px rgba(20, 50, 35, .32);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 16% 10%, rgba(52, 224, 164, .16), transparent 65%),
    radial-gradient(30% 28% at 88% 6%, rgba(183, 242, 107, .12), transparent 62%),
    radial-gradient(36% 40% at 68% 94%, rgba(58, 120, 255, .08), transparent 65%);
}

html[data-theme="light"] body::before {
  background:
    radial-gradient(38% 34% at 14% 8%, rgba(43, 122, 54, .12), transparent 65%),
    radial-gradient(30% 28% at 88% 4%, rgba(255, 196, 90, .2), transparent 62%),
    radial-gradient(36% 40% at 70% 94%, rgba(11, 127, 99, .1), transparent 65%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 72%);
}

html[data-theme="light"] body::after {
  background-image:
    linear-gradient(rgba(13, 27, 20, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 27, 20, .045) 1px, transparent 1px);
}

[hidden] { display: none !important; }

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2 { text-wrap: balance; }
h2, h3 { font-family: var(--font-display); font-weight: 600; }

.container {
  width: min(var(--max), 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  background: transparent;
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
  transition: background .3s, border-color .3s, box-shadow .3s;
}

.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--stroke);
  box-shadow: 0 24px 50px -38px rgba(0, 0, 0, .7);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand-mark {
  display: inline-flex;
  color: var(--text);
  filter: drop-shadow(0 0 14px var(--accent-glow));
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -.035em;
}

.brand-dot { color: var(--accent); }

.nav {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .91rem;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s, background .2s;
}

.nav a:hover { color: var(--text); background: var(--hover); }

.nav a.is-active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--hover);
  color: var(--text-soft);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--hover);
  color: var(--text);
  cursor: pointer;
}

.burger span {
  width: 16px;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s;
}

.burger[aria-expanded="true"] span:first-child { transform: translateY(3.4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.4px) rotate(-45deg); }

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  --h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: var(--h);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .94rem;
  font-weight: 800;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s, box-shadow .25s, background .25s, border-color .25s, color .25s;
}

.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: var(--grad);
  color: var(--accent-ink);
  box-shadow: 0 16px 36px -18px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 20px 48px -18px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--hover);
  color: var(--text);
  border-color: var(--stroke-strong);
}

.btn-ghost:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.btn-sm { --h: 38px; padding: 0 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn svg { flex: none; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(40px, 6.5vw, 76px) 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy { max-width: 660px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--hover);
  color: var(--text-soft);
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.badge-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(2.1rem, 4.1vw, 3.45rem);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.lead {
  margin: 0 0 28px;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-soft);
  font-size: .87rem;
  font-weight: 600;
}

.hero-points li { display: flex; align-items: center; gap: 8px; }

.tick {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .66rem;
  font-weight: 900;
  line-height: 1;
}

/* Hero-панель */
.hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 440px;
  padding: 14px 0;
}

.hero-panel {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--stroke-strong);
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

html[data-theme="light"] .hero-panel {
  background: linear-gradient(160deg, #ffffff, #fbfcf7);
}

.hp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
}

.chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}

.hp-ring {
  position: relative;
  width: min(218px, 72%);
  aspect-ratio: 1;
  margin: 18px auto 10px;
}

.ring-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--stroke);
  stroke-width: 9;
}

.ring-value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 9;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px var(--accent-glow));
  transition: stroke-dashoffset .6s cubic-bezier(.22, 1, .36, 1), stroke .3s;
}

.ring-value.is-over {
  stroke: var(--danger);
  filter: drop-shadow(0 0 10px var(--danger-soft));
}

.hp-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hp-center strong {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
}

.hp-center span {
  margin-top: 6px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600;
}

.hp-macros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  padding: 13px 0;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size: .76rem;
}

.hp-macros span { display: inline-flex; align-items: center; gap: 6px; }
.hp-macros b { color: var(--text); font-weight: 800; }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-p { background: var(--good); }
.dot-f { background: var(--warn); }
.dot-c { background: var(--violet); }

.hp-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--good-soft);
  color: var(--good);
  font-size: .74rem;
  font-weight: 700;
}

.hero-float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: var(--panel-solid);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 700;
  animation: floaty 7s ease-in-out infinite;
  pointer-events: none;
}

.hero-float b { color: var(--text); font-weight: 800; }
.float-1 { top: 21%; left: -9%; animation-delay: -1s; }
.float-2 { top: 29%; right: -8%; animation-delay: -3s; }
.float-3 { bottom: 1%; left: -10%; animation-delay: -5s; }
.float-4 { bottom: 3%; right: 1%; animation-delay: -2s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* Статистика */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.stat {
  padding: 22px 24px 24px;
  border-left: 1px solid var(--stroke);
}

.stat:first-child { padding-left: 0; border-left: 0; }

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .8rem;
}

/* ============================================================
   Секции
   ============================================================ */
.section {
  padding: clamp(64px, 9vw, 112px) 0;
  scroll-margin-top: 88px;
}

.section-head {
  max-width: 740px;
  margin-bottom: clamp(30px, 4vw, 48px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  opacity: .8;
}

.section-head h2 {
  margin: 16px 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.section-lead {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: clamp(.95rem, 1.15vw, 1.04rem);
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Норма
   ============================================================ */
.norm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 18px;
  align-items: stretch;
}

.form-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(20px, 2.4vw, 30px);
}

.field { display: flex; flex-direction: column; gap: 11px; }

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.field-label {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-hint {
  color: var(--accent);
  font-size: .76rem;
  font-weight: 700;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(0, 0, 0, .18);
}

html[data-theme="light"] .segmented { background: rgba(13, 27, 20, .04); }

.segmented button {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
}

.segmented button:hover { color: var(--text); }

.segmented button.is-active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent-line), 0 8px 18px -14px rgba(0, 0, 0, .7);
}

.segmented-wrap {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  flex-wrap: wrap;
}
.segmented-wrap button { flex: none; font-size: .74rem; padding: 9px 4px; }

.slider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.slider-field { display: flex; flex-direction: column; gap: 5px; }

.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.slider-head label { font-size: .8rem; font-weight: 700; color: var(--text-soft); }

.slider-head output {
  font-size: .95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 8px 0 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--stroke-strong) var(--fill, 50%));
  cursor: pointer;
  outline-offset: 6px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--panel-solid);
  box-shadow: 0 0 0 4px var(--accent-soft);
  transition: transform .15s;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }

input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--panel-solid);
  box-shadow: 0 0 0 4px var(--accent-soft);
  cursor: pointer;
}

input[type="range"]::-moz-range-track { height: 6px; background: transparent; }

.slider-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 600;
}

.norm-result {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(22px, 2.6vw, 32px);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 55%),
    var(--panel);
  overflow: hidden;
}

.norm-result .eyebrow { font-size: .67rem; }

.norm-big {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 8px;
}

.norm-big span {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.05em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.norm-big small { color: var(--muted); font-size: .88rem; font-weight: 700; }

.norm-note { margin: 0; color: var(--muted); font-size: .78rem; }

.macro-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.macro-tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--hover);
}

.macro-tile span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.macro-tile strong { font-size: 1.02rem; font-weight: 800; }

.norm-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
}

.norm-meta > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; }

.norm-meta span {
  width: 100%;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.norm-meta strong { font-size: 1.1rem; font-weight: 800; }
.norm-meta em { font-style: normal; color: var(--muted); font-size: .76rem; font-weight: 600; }

.bmi-note.low, .bmi-note.warn { color: var(--warn); }
.bmi-note.ok { color: var(--good); }
.bmi-note.bad { color: var(--danger); }

.meal-plan { padding-top: 16px; border-top: 1px solid var(--stroke); }

.mini-title {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.meal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.meal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: var(--hover);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 600;
}

.meal-chip i { font-style: normal; }
.meal-chip b { color: var(--text); font-weight: 800; }

.norm-foot { margin: 0; color: var(--muted); font-size: .71rem; line-height: 1.5; }

/* ============================================================
   Каталог
   ============================================================ */
.catalog-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: start;
}

.catalog { min-width: 0; }

.toolbar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.search {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--panel-solid);
  transition: border-color .2s, box-shadow .2s;
}

.search:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search svg { flex: none; color: var(--muted); }

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: .92rem;
  outline: none;
}

.search input::placeholder { color: var(--muted); opacity: .85; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search kbd {
  padding: 2px 6px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  background: var(--hover);
  color: var(--muted);
  font-family: inherit;
  font-size: .68rem;
}

.sort {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 4px 0 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--panel-solid);
}

.sort span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sort select {
  -webkit-appearance: none;
  appearance: none;
  height: 100%;
  padding: 0 30px 0 0;
  border: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2390a89d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 6px center;
  color: var(--text);
  font-size: .83rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.sort option, .pc-select option { background: var(--panel-solid); color: var(--text); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 2px 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .81rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.chip span { font-size: .68rem; opacity: .65; }
.chip:hover { color: var(--text); border-color: var(--stroke-strong); }

.chip.is-active {
  color: var(--text);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.chip.is-active span { color: var(--accent); opacity: 1; }

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0 16px;
}

.quick-filters { display: flex; flex-wrap: wrap; gap: 6px; }

.quick-filters button {
  padding: 6px 11px;
  border: 1px dashed var(--stroke-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.quick-filters button:hover { color: var(--text); border-color: var(--accent-line); }

.quick-filters button.is-active {
  color: var(--accent);
  border-style: solid;
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.result-count {
  color: var(--muted);
  font-size: .77rem;
  font-weight: 600;
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 14px;
}

.p-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s, background .25s;
}

html[data-theme="light"] .p-card {
  background: #ffffff;
  box-shadow: 0 14px 32px -28px rgba(20, 50, 35, .45);
}

.p-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 45% at 50% 0%, rgba(var(--tint), .13), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.p-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-sm);
}

.p-card:hover::after { opacity: 1; }

.p-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.p-emoji {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(var(--tint), .2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(var(--tint), .26), rgba(var(--tint), .05));
  font-size: 1.4rem;
}

.p-cat {
  color: var(--muted);
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: right;
}

.p-name {
  position: relative;
  z-index: 1;
  min-height: 2.5em;
  margin: 0 0 10px;
  font-size: .97rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.p-kcal { display: flex; align-items: baseline; gap: 7px; }

.p-kcal strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
}

.p-kcal span { color: var(--muted); font-size: .67rem; font-weight: 600; }

.p-macros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 12px 0 14px;
  color: var(--text-soft);
  font-size: .74rem;
  font-weight: 700;
}

.p-macros span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.p-macros i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

.macro-p i { background: var(--good); }
.macro-f i { background: var(--warn); }
.macro-c i { background: var(--violet); }

.p-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}

.p-portion { color: var(--muted); font-size: .67rem; font-weight: 600; }

.add-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s;
}

.add-btn:hover { background: var(--accent); color: var(--accent-ink); transform: rotate(90deg); }
.add-btn:active { transform: scale(.86); }
.add-btn.is-added { transform: scale(.86); background: var(--accent); color: var(--accent-ink); }

.empty-state {
  padding: 52px 20px;
  border: 1px dashed var(--stroke-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-emoji { font-size: 2rem; }
.empty-state h3 { margin: 10px 0 4px; font-size: 1.05rem; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: .88rem; }

/* ============================================================
   Тарелка
   ============================================================ */
.plate {
  position: sticky;
  top: 88px;
  scroll-margin-top: 88px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 108px);
  padding: 18px;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stroke-strong) transparent;
}

.plate::-webkit-scrollbar { width: 6px; }
.plate::-webkit-scrollbar-thumb { background: var(--stroke-strong); border-radius: 99px; }

.plate.is-pulse { animation: platePulse .9s ease-out; }
@keyframes platePulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  100% { box-shadow: 0 0 0 22px transparent; }
}

.plate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--stroke);
}

.plate-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

.plate-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .71rem;
  font-weight: 600;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--hover);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.icon-btn:hover:not(:disabled) {
  color: var(--danger);
  border-color: currentColor;
  background: var(--danger-soft);
}

.icon-btn:disabled { opacity: .35; cursor: default; }

.plate-empty { padding: 22px 2px 4px; text-align: center; }
.empty-bowl { font-size: 2.4rem; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .25)); }

.plate-empty > p {
  max-width: 30ch;
  margin: 10px auto 18px;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}

.presets { display: grid; gap: 8px; margin-top: 10px; }

.preset {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 13px;
  background: var(--hover);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.preset:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateX(2px);
}

.preset-emoji { font-size: 1.1rem; }
.preset-text { display: flex; flex-direction: column; line-height: 1.25; }
.preset-text b { font-size: .81rem; font-weight: 700; }
.preset-text small { margin-top: 2px; color: var(--muted); font-size: .69rem; font-weight: 600; }

.plate-list { margin: 0; padding: 6px 0 0; list-style: none; }

.plate-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--stroke);
}

.pi-emoji { font-size: 1.12rem; }
.pi-info { display: flex; flex-direction: column; min-width: 0; }

.pi-name {
  overflow: hidden;
  font-size: .79rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pi-kcal { margin-top: 2px; color: var(--muted); font-size: .67rem; font-weight: 600; }

.pi-grams {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--hover);
}

.pi-grams input {
  width: 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: .76rem;
  font-weight: 700;
  text-align: right;
  outline: none;
  -webkit-appearance: textfield;
  appearance: textfield;
}

.pi-grams input::-webkit-outer-spin-button,
.pi-grams input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pi-grams span { color: var(--muted); font-size: .64rem; }

.pi-del {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: color .2s, background .2s;
}

.pi-del:hover { background: var(--danger-soft); color: var(--danger); }

.plate-summary { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }

.summary-ring {
  position: relative;
  width: 154px;
  aspect-ratio: 1;
  margin: 2px auto 0;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-center strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
}

.ring-center span { margin-top: 5px; color: var(--muted); font-size: .62rem; font-weight: 600; }

.summary-status {
  margin: 0;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
}
.summary-status.is-over { color: var(--danger); }
.summary-status.is-good { color: var(--good); }

.macro-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.macro-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: .69rem;
}

.macro-name { color: var(--muted); font-weight: 700; }

.macro-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--stroke);
}

.macro-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width .5s cubic-bezier(.22, 1, .36, 1);
}

.macro-row.p .macro-bar i { background: var(--good); }
.macro-row.f .macro-bar i { background: var(--warn); }
.macro-row.c .macro-bar i { background: var(--violet); }
.macro-row.is-over .macro-bar i { background: var(--danger); }

.macro-val {
  color: var(--text-soft);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.compat { display: flex; flex-direction: column; gap: 9px; }
.compat-empty { margin: 0; color: var(--muted); font-size: .75rem; }

.compat-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--good);
  font-size: .77rem;
  font-weight: 700;
}

.compat-list { display: flex; flex-direction: column; gap: 8px; }

.compat-row {
  display: flex;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--hover);
}

.compat-row.bad { border-color: rgba(255, 129, 129, .24); background: var(--danger-soft); }
.compat-row.caution { border-color: rgba(255, 200, 97, .22); background: var(--warn-soft); }
.compat-row.good { border-color: rgba(78, 227, 154, .2); background: var(--good-soft); }

.compat-ico {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  font-size: .64rem;
  font-weight: 900;
  line-height: 1;
}

.compat-ico.bad { background: var(--danger); color: var(--bg); }
.compat-ico.caution { background: var(--warn); color: var(--bg); }
.compat-ico.good { background: var(--good); color: var(--bg); }

.compat-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.compat-text strong { font-size: .72rem; font-weight: 800; }
.compat-text span { color: var(--muted); font-size: .67rem; line-height: 1.45; }

.plate-actions { margin-top: auto; padding-top: 14px; }
.plate-actions .btn { height: 42px; font-size: .81rem; }

/* ============================================================
   Сочетания
   ============================================================ */
.pair-checker {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(100% 120% at 0% 0%, var(--accent-soft), transparent 55%),
    var(--panel);
  box-shadow: var(--shadow-sm);
}

.pc-copy h3 { margin: 0 0 6px; font-size: 1.14rem; letter-spacing: -.02em; }
.pc-copy p { margin: 0; color: var(--muted); font-size: .84rem; }

.pc-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 20px;
}

.pc-select { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.pc-select span {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pc-select select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background-color: var(--panel-solid);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2390a89d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.pc-plus {
  display: grid;
  place-items: center;
  height: 44px;
  color: var(--muted);
  font-weight: 600;
}

.pc-result { min-height: 96px; margin-top: 16px; }

.pc-pair {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: .85rem;
  font-weight: 700;
}

.pc-pair i { color: var(--accent); font-style: normal; }

.pc-verdict {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--hover);
}

.pc-verdict.good { border-color: rgba(78, 227, 154, .28); background: var(--good-soft); }
.pc-verdict.caution { border-color: rgba(255, 200, 97, .28); background: var(--warn-soft); }
.pc-verdict.bad { border-color: rgba(255, 129, 129, .28); background: var(--danger-soft); }

.pc-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--stroke);
  color: var(--text);
  font-size: .9rem;
  font-weight: 900;
}

.pc-ico.good { background: var(--good); color: var(--bg); }
.pc-ico.caution { background: var(--warn); color: var(--bg); }
.pc-ico.bad { background: var(--danger); color: var(--bg); }
.pc-ico.neutral { background: var(--hover); color: var(--muted); }

.pc-body { min-width: 0; }
.pc-body strong { display: block; margin-bottom: 2px; font-size: .87rem; font-weight: 800; }
.pc-body p { margin: 0; color: var(--muted); font-size: .79rem; line-height: 1.5; }
.pc-body p b { color: var(--text-soft); }

.pc-more {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: .73rem;
}
.pc-more li.good::marker { color: var(--good); }
.pc-more li.bad::marker { color: var(--danger); }
.pc-more li.caution::marker { color: var(--warn); }

.basis {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.basis.science { background: var(--accent-soft); color: var(--accent); }
.basis.tradition { border: 1px solid var(--stroke); background: var(--hover); color: var(--muted); }

.combo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 16px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--hover);
}

.tabs button {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .81rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, background .2s;
}

.tabs button:hover { color: var(--text); }
.tabs button.is-active { background: var(--text); color: var(--bg); }

.combo-hint { color: var(--muted); font-size: .75rem; font-weight: 600; }

.combo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.combo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: var(--panel);
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}

.combo-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--good);
  opacity: .7;
}

.combo-card.bad::before { background: var(--danger); }
.combo-card.caution::before { background: var(--warn); }

.combo-card:hover { transform: translateY(-3px); border-color: var(--stroke-strong); }

.combo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.combo-emoji { display: flex; align-items: center; gap: 6px; font-size: 1.7rem; }
.combo-emoji i { color: var(--muted); font-size: .85rem; font-style: normal; font-weight: 400; }

.combo-badge {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.combo-badge.good { background: var(--good-soft); color: var(--good); }
.combo-badge.bad { background: var(--danger-soft); color: var(--danger); }
.combo-badge.caution { background: var(--warn-soft); color: var(--warn); }

.combo-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.combo-card > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .81rem;
  line-height: 1.55;
}

.combo-add {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: .77rem;
  font-weight: 800;
  cursor: pointer;
}

.combo-add:hover { text-decoration: underline; text-underline-offset: 3px; }

.combo-fix {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 11px;
  background: var(--hover);
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.5;
}

.combo-fix strong { color: var(--text-soft); }

.combo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

.combo-tags .tag {
  padding: 4px 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--hover);
  color: var(--muted);
  font-size: .64rem;
  font-weight: 700;
}

.combo-tags .basis { margin-top: 0; }

.note-box {
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px dashed var(--stroke-strong);
  border-radius: 16px;
  background: var(--hover);
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.6;
}

.note-box strong { color: var(--text-soft); }

/* ============================================================
   Принципы
   ============================================================ */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.principle {
  padding: 22px;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: var(--panel);
}

.principle-num {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
}

.principle h3 { margin: 12px 0 8px; font-size: .98rem; }
.principle p { margin: 0; color: var(--muted); font-size: .81rem; line-height: 1.55; }

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
  margin-top: 20px;
  padding: 40px 0;
  border-top: 1px solid var(--stroke);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px 40px;
  align-items: start;
}

.footer-brand p {
  max-width: 40ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .79rem;
}

.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }

.footer-nav a {
  color: var(--muted);
  font-size: .81rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.footer-nav a:hover { color: var(--accent); }

.footer-legal {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size: .71rem;
}

/* ============================================================
   FAB, тосты, noscript
   ============================================================ */
.plate-fab {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 55;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: var(--accent-ink);
  font-size: .8rem;
  font-weight: 800;
  box-shadow: 0 18px 40px -14px var(--accent-glow);
  cursor: pointer;
}

.plate-fab[hidden] { display: none !important; }

.toasts {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(340px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity .25s, transform .25s;
}

.toast.show { opacity: 1; transform: none; }

.toast-ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .68rem;
  font-weight: 900;
}

.toast strong { display: block; font-size: .79rem; }
.toast div { min-width: 0; }
.toast div > span { display: block; margin-top: 2px; color: var(--muted); font-size: .73rem; overflow-wrap: anywhere; }

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 200;
  padding: 14px;
  border-radius: 12px;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1150px) {
  .catalog-wrap { grid-template-columns: 1fr; }

  .plate {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .plate-fab:not([hidden]) { display: inline-flex; }
  .toasts { bottom: 80px; }
}

@media (min-width: 761px) and (max-width: 1150px) {
  .plate-summary {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    column-gap: 22px;
    align-items: center;
  }

  .summary-ring { grid-row: span 2; margin: 0 auto; }
  .summary-status { text-align: left; }
  .macro-list { padding: 0; border: 0; }
  .compat { grid-column: 1 / -1; margin-top: 6px; }
  .plate-actions { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: none; }
  .hero-visual { justify-self: center; max-width: 420px; margin-top: 10px; }
  .hero-float { display: none; }
  .norm-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 18px 20px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--stroke); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--stroke); }
}

@media (max-width: 1020px) {
  .header-cta { display: none; }
}

@media (max-width: 900px) {
  .nav {
    position: absolute;
    top: calc(100% + 6px);
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    background: var(--panel-solid);
    box-shadow: var(--shadow-lg);
  }

  .nav.open { display: flex; }
  .nav a { padding: 11px 14px; border-radius: 11px; }
  .burger { display: inline-flex; }
  .combo-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 760px) {
  .container { width: min(var(--max), 100% - 32px); }
  .header-cta { display: none; }
  .hero h1 { letter-spacing: -.04em; }

  .toolbar { flex-direction: column; }
  .sort { flex: none; width: 100%; justify-content: space-between; }

  .filter-row { align-items: flex-start; flex-direction: column; }

  .pc-controls { grid-template-columns: 1fr; gap: 12px; }
  .pc-plus { display: none; }
  .pc-controls .btn { width: 100%; }

  .combo-toolbar { align-items: flex-start; }
  .combo-tabs { width: 100%; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { order: 2; }

  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 620px) {
  .slider-grid { grid-template-columns: 1fr; gap: 16px; }
  .macro-tiles { gap: 8px; }
  .macro-tile { padding: 10px; }
  .macro-tile strong { font-size: .94rem; }
  .segmented button { font-size: .78rem; padding: 9px 6px; }
  .segmented-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented-wrap button { flex: none; }
  .segmented-wrap button:last-child { grid-column: 1 / -1; }
  .principles-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat strong { font-size: 1.35rem; }
  .stat span { font-size: .72rem; }
  .combo-card { padding: 18px; }
  .note-box { font-size: .75rem; }
}

@media (max-width: 460px) {
  .header-inner { gap: 12px; min-height: 64px; }
  .brand-name { font-size: .96rem; }
  .theme-toggle, .burger { width: 36px; height: 36px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .p-card { padding: 13px; }
  .p-emoji { width: 40px; height: 40px; font-size: 1.2rem; }
  .p-name { font-size: .88rem; }
  .p-kcal strong { font-size: 1.5rem; }
  .p-portion { display: block; font-size: .6rem; }
  .portion-word { display: none; }
  .p-foot { gap: 5px; }
  .p-cat { display: none; }
  .p-macros { gap: 4px 8px; font-size: .68rem; }
  .plate { padding: 15px; }
  .plate-item { grid-template-columns: 26px minmax(0, 1fr) auto 22px; gap: 7px; }
  .pi-grams input { width: 32px; }
  .hero-actions .btn { flex: 1; }
  .hero-actions { width: 100%; }
  .plate-fab { right: 12px; bottom: 12px; padding: 10px 13px; font-size: .76rem; }
  .fab-label { display: none; }
  .meal-chips { gap: 6px; }
  .meal-chip { font-size: .69rem; padding: 6px 8px; }
  .tabs { flex-wrap: wrap; border-radius: 16px; }
  .tabs button { flex: 1 1 auto; }
  .toasts { right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 1.85rem; }
  .product-grid { grid-template-columns: 1fr; }
  .p-portion { display: block; }
}

@media (hover: none) {
  .p-card:hover { transform: none; }
  .combo-card:hover { transform: none; }
  .preset:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-float, .badge-dot { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
