/* Радар идей — по мотивам productradar.ru: Inter, белый фон, серые панели, синий акцент. */
:root {
  --primary: #4a6ddb;
  --primary-darker: #4061d4;
  --primary-soft: #ecf2ff;
  --text: #1c1c28;
  --muted: #8f90a6;
  --muted-2: #555770;
  --light-1: #e4e4eb;
  --light-2: #ebebf0;
  --light-3: #f2f2f5;
  --light-4: #fafafc;
  --bg: #fff;
  --red: #ff3b3b;
  --yellow: #fff7e6;
  --yellow-b: #ffd591;
  --br-s: 5px;
  --br-m: 10px;
  --page: 1240px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 16px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: var(--br-s); padding: 9px 14px; cursor: pointer;
  font: 600 14px/1.2 inherit; font-family: inherit; background: var(--light-3); color: var(--text);
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--light-1); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-darker); }
.btn--block { width: 100%; }
.btn--more { display: block; margin: 18px auto 0; min-width: 220px; }
.link { background: none; border: 0; padding: 6px 0 0; color: var(--primary); cursor: pointer; font: 500 13px inherit; font-family: inherit; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--light-2); }
.top__in { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo__dish { font-size: 24px; display: inline-block; transform-origin: 60% 70%; }
.logo:hover .logo__dish { animation: wobble .8s ease; }
.logo b { color: var(--primary); }
@keyframes wobble { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 60% { transform: rotate(12deg); } }
.search { flex: 1; position: relative; display: flex; align-items: center; max-width: 560px; margin-left: auto; }
.search svg { position: absolute; left: 12px; width: 18px; fill: var(--muted); }
.search input {
  width: 100%; height: 42px; border: 1px solid var(--light-1); border-radius: var(--br-m);
  padding: 0 40px 0 38px; font: 15px inherit; font-family: inherit; background: var(--light-3); color: var(--text);
  outline: none; transition: border .15s, background .15s;
}
.search input:focus { border-color: var(--primary); background: #fff; }
.search kbd { position: absolute; right: 10px; font: 600 11px inherit; font-family: inherit; color: var(--muted); border: 1px solid var(--light-1); border-radius: 4px; padding: 1px 6px; background: #fff; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding-top: 32px; padding-bottom: 8px; }
.hero__kicker { margin: 0 0 8px; color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 800; }
.hero h1 a { color: var(--primary); }
.hero__lead { color: var(--muted-2); font-size: 16px; margin: 0 0 20px; max-width: 560px; }
.hero__img { width: 100%; height: auto; border-radius: var(--br-m); }
.hero__nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.num { background: var(--light-3); border-radius: var(--br-m); padding: 10px 12px; }
.num b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.num span { font-size: 12px; color: var(--muted-2); line-height: 1.25; display: block; }

/* facts ticker */
.facts { display: flex; gap: 10px; overflow-x: auto; padding-top: 16px; padding-bottom: 8px; scrollbar-width: none; }
.facts::-webkit-scrollbar { display: none; }
.fact { flex: 0 0 auto; background: var(--yellow); border: 1px solid var(--yellow-b); border-radius: 999px; padding: 6px 14px; font-size: 13px; white-space: nowrap; }
.fact b { font-weight: 700; }

/* layout */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 24px; padding-top: 16px; padding-bottom: 48px; align-items: start; }
.side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 96px); overflow: auto; scrollbar-width: thin; }
.panel { background: var(--light-4); border: 1px solid var(--light-2); border-radius: var(--br-m); padding: 14px; }
.panel__title { margin: 0 0 10px; font-size: 15px; font-weight: 700; }

.cats { display: flex; flex-direction: column; gap: 2px; }
.cat { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--br-s); color: var(--text); font-size: 14px; cursor: pointer; border: 0; background: none; text-align: left; font-family: inherit; }
.cat:hover { background: var(--light-3); text-decoration: none; }
.cat.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.cat img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; background: #fff; }
.cat span { flex: 1; line-height: 1.25; }
.cat em { font-style: normal; font-size: 12px; color: var(--muted); }

/* feed */
.feed__bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.seg { display: flex; gap: 4px; background: var(--light-3); padding: 4px; border-radius: var(--br-m); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; font: 600 13px inherit; font-family: inherit; color: var(--muted-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(28,28,40,.12); }
select { height: 38px; border: 1px solid var(--light-1); border-radius: var(--br-s); padding: 0 10px; font: 500 14px inherit; font-family: inherit; background: #fff; color: var(--text); }
.active { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.active:empty { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; border: 0; cursor: pointer; font-family: inherit; }
.pill::after { content: "✕"; font-size: 11px; opacity: .8; }
.feed__count { color: var(--muted); font-size: 13px; margin: 12px 0 6px; }

.list { list-style: none; margin: 0; padding: 0; }
.card { display: grid; grid-template-columns: 28px 76px minmax(0,1fr) 56px; gap: 14px; padding: 16px 8px; border-bottom: 1px solid var(--light-2); align-items: start; border-radius: var(--br-m); transition: background .15s; }
.card:hover { background: var(--light-4); }
.card__n { color: var(--muted); font-weight: 600; font-size: 14px; padding-top: 24px; text-align: right; }
.card__img { width: 76px; height: 76px; border-radius: var(--br-m); object-fit: cover; border: 1px solid var(--light-2); background: #fff; }
.card__body { min-width: 0; cursor: pointer; }
.card__name { font-weight: 700; font-size: 16px; margin: 0 0 2px; line-height: 1.3; word-break: break-word; }
.card__name a { color: var(--text); }
.card__pitch { margin: 0 0 8px; color: var(--muted-2); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { border: 0; background: var(--light-3); color: var(--muted-2); border-radius: var(--br-s); padding: 3px 8px; font: 500 12px/1.4 inherit; font-family: inherit; cursor: pointer; }
.chip:hover { background: var(--primary-soft); color: var(--primary); }
.chip--kind { background: var(--yellow); color: #8a5a00; }
.chip--cat { background: var(--primary-soft); color: var(--primary); }
.vote { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 56px; height: 64px; border: 1px solid var(--light-1); border-radius: var(--br-m); background: #fff; cursor: pointer; font-family: inherit; color: var(--text); transition: border .15s, transform .1s; }
.vote:hover { border-color: var(--primary); }
.vote:active { transform: scale(.94); }
.vote i { font-style: normal; font-size: 18px; line-height: 1; filter: grayscale(1); opacity: .6; transition: .2s; }
.vote b { font-size: 13px; }
.vote.on { border-color: var(--red); background: #fff1f1; }
.vote.on i { filter: none; opacity: 1; animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.5) rotate(-10deg); } }

.more { grid-column: 3 / 5; margin-top: 4px; font-size: 14px; display: none; }
.card.open .more { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }
.more p { margin: 0 0 10px; }
.note { border-radius: var(--br-m); padding: 10px 12px; margin: 0 0 10px; }
.note--chat { background: var(--light-3); }
.note--bot { background: var(--yellow); border: 1px dashed var(--yellow-b); }
.note small { display: block; font-weight: 700; font-size: 12px; margin-bottom: 2px; color: var(--muted-2); }
.more__links { display: flex; flex-wrap: wrap; gap: 8px; }
.more__links .btn { padding: 7px 12px; font-size: 13px; }
.meta { color: var(--muted); font-size: 12px; margin-top: 6px; }

.empty { text-align: center; padding: 32px 16px; color: var(--muted-2); }
.empty img { width: 280px; margin: 0 auto 12px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 20px; }

/* cloud */
.cloud { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; line-height: 1.3; }
.cloud button { border: 0; background: none; padding: 1px 2px; cursor: pointer; font-family: inherit; color: var(--muted-2); border-radius: 4px; }
.cloud button:hover { color: var(--primary); background: var(--primary-soft); }
.cloud button.on { color: #fff; background: var(--primary); }
.cloud .w5 { font-size: 22px; font-weight: 800; color: var(--text); }
.cloud .w4 { font-size: 18px; font-weight: 700; color: var(--text); }
.cloud .w3 { font-size: 15px; font-weight: 600; }
.cloud .w2 { font-size: 13px; font-weight: 500; }
.cloud .w1 { font-size: 12px; color: var(--muted); }

.gen__out { font-size: 15px; font-weight: 600; margin: 0 0 6px; min-height: 44px; }
.gen__out a { cursor: pointer; }
.gen__score { font-size: 12px; color: var(--muted-2); margin: 0 0 10px; min-height: 18px; }
.day__name { font-weight: 700; margin: 0 0 2px; cursor: pointer; }
.day__name:hover { color: var(--primary); }
.day p { margin: 0 0 6px; font-size: 13px; color: var(--muted-2); }

.foot { background: var(--light-3); border-top: 1px solid var(--light-2); }
.foot__in { padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--muted-2); }
.foot__in p { margin: 0 0 8px; max-width: 760px; }
.foot__small { font-size: 12px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px); opacity: 0; background: var(--text); color: #fff; padding: 10px 16px; border-radius: var(--br-m); font-size: 14px; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: var(--primary-soft); } }

/* responsive */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .side--right { grid-column: 1 / -1; position: static; max-height: none; display: grid; grid-template-columns: repeat(3, 1fr); order: 3; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 20px; }
  .hero__img { order: -1; max-height: 260px; object-fit: contain; }
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .side--left .cats { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .side--left .cat { flex: 0 0 auto; background: var(--light-3); white-space: nowrap; }
  .side--left .cat img { display: none; }
  .side--left .panel { padding: 10px; }
  .side--right { grid-template-columns: 1fr; }
  .top__lucky span { display: none; }
  .search kbd { display: none; }
}
@media (max-width: 520px) {
  .logo__text { display: none; }
  .card { grid-template-columns: 56px minmax(0,1fr) 48px; gap: 10px; padding: 14px 4px; }
  .card__n { display: none; }
  .card__img { width: 56px; height: 56px; }
  .vote { width: 48px; height: 56px; }
  .more { grid-column: 1 / -1; }
  .hero__nums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .num b { font-size: 18px; }
}
