:root {
    --bg: #f4efe6;
    --ink: #1c1915;
    --muted: #6f685f;
    --card: rgba(255, 252, 247, 0.86);
    --line: rgba(28, 25, 21, 0.08);
    --green: #146c43;
    --green-deep: #0d4d30;
    --green-soft: #e7f5ee;
    --amber: #9a5b09;
    --amber-soft: #fff3dc;
    --red: #b42318;
    --red-soft: #fde8e4;
    --slate: #3d4a57;
    --shadow: 0 18px 50px rgba(72, 48, 16, 0.08);
    --radius: 22px;
    font-family: Manrope, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    min-height: 100vh;
    letter-spacing: -0.011em;
    line-height: 1.5;
    font-size: 16px;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-deep); }

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.atmosphere { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
}
.orb-a {
    width: 340px;
    height: 340px;
    right: -80px;
    top: -90px;
    background: radial-gradient(circle, rgba(20, 108, 67, 0.22), transparent 68%);
}
.orb-b {
    width: 280px;
    height: 280px;
    left: -70px;
    top: 220px;
    background: radial-gradient(circle, rgba(214, 142, 62, 0.2), transparent 70%);
}

.top, main, .foot { position: relative; z-index: 1; }
.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 8px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
}
.mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--green);
    color: #f6f3ec;
    box-shadow: 0 8px 18px rgba(20, 108, 67, 0.25);
}
.pill {
    border: 1px solid var(--line);
    background: rgba(255, 252, 247, 0.7);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

main {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 48px;
}
.hero { padding: 28px 0 8px; }
.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--green);
}
h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.045em;
}
.lead {
    max-width: 38rem;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.5;
    font-weight: 500;
}

.finder {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    margin-top: 26px;
    padding: 8px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.finder-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 14px;
    color: var(--muted);
}
.finder-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 700;
}
.finder-field input::placeholder { color: #a39b91; font-weight: 500; }

.btn {
    border: 0;
    border-radius: 18px;
    padding: 0 16px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-solid { background: var(--ink); color: #f7f3ec; }
.btn-solid:hover { background: #000; }
.btn-ghost { background: var(--green-soft); color: var(--green-deep); }
.icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
}

.stage { margin-top: 22px; display: grid; gap: 14px; }
.panel {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    animation: rise 0.45s ease both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.product {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
    align-items: center;
}
.product-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.shot {
    width: 220px;
    height: 220px;
    border-radius: 22px;
    object-fit: contain;
    background: #f7f1e6;
    padding: 10px;
}
.shot.placeholder {
    display: grid;
    place-items: center;
    color: #b3aa9e;
}
.kicker { margin: 0; color: var(--muted); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.product h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.15; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.meta { margin: 0; color: var(--muted); font-weight: 600; }

.verdict { padding: 18px 18px 8px; }
.verdict-head { display: flex; gap: 14px; align-items: center; }
.badge-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: none;
}
.verdict h3 { margin: 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.confidence { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; font-weight: 600; }
.reasons { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; gap: 8px; }
.reasons li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-weight: 600;
    line-height: 1.35;
}
.compose { padding: 16px 18px 18px; }
.ingredients, .ingredient-list, .prose, .col li, .sum li {
    overflow-wrap: anywhere;
    line-height: 1.55;
}
.ingredients {
    margin: 12px 0 0;
    max-width: 68ch;
    font-weight: 500;
    font-size: 1rem;
}
.ingredient-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.ingredient-list li {
    background: #f7f3ec;
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 600;
}
.summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.sum:not(.sum-verdict) {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sum {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}
.sum-verdict { display: flex; flex-direction: row; flex-wrap: wrap; gap: 14px; align-items: center; grid-column: 1 / -1; }
.sum-verdict .reasons { flex: 1 0 100%; margin: 0; }
.sum-verdict.v-buy { background: #e7f5ee; }
.sum-verdict.v-ok { background: #f3fbf6; }
.sum-verdict.v-caution { background: #fff3dc; }
.sum-verdict.v-avoid { background: #fde8e4; }
.sum-verdict strong { display: block; font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1.1; }
.sum-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.sum-verdict .sum-label { margin: 0 0 4px; }
.sum strong { font-size: 1.05rem; }
.sum-rate { display: flex; align-items: center; gap: 8px; font-size: 1.35rem !important; }
.sum span, .sum-empty { color: var(--muted); font-weight: 600; }
.sum ul { margin: 0; padding-left: 18px; }
.sum li { margin: 0 0 6px; font-weight: 600; }
.sum-plus { background: #f3fbf6; }
.sum-minus { background: #fff6f4; }
.details { display: grid; gap: 14px; scroll-margin-top: 16px; }
.details-jump {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 800;
    color: var(--ink);
    background: white;
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: var(--shadow);
}
.fact-rate { display: inline-flex; align-items: center; gap: 8px; }
.e, .echip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 800;
    line-height: 1.4;
}
.echips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.echip { padding: 7px 10px; font-size: 0.82rem; }
.e-high, .echip.e-high { background: #fde8e4; color: #b42318; }
.e-medium, .echip.e-medium { background: #fff3dc; color: #9a5b09; }
.e-low, .echip.e-low { background: #e7f5ee; color: #146c43; }
.e-unknown, .echip.e-unknown { background: #eeeae4; color: #3d4a57; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.col { border-radius: 16px; padding: 12px 14px 8px; }
.col h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.col h4 svg { width: 16px; height: 16px; flex: none; }
.col ul { margin: 0; padding-left: 18px; }
.col li, .col p { margin: 0 0 8px; font-weight: 600; line-height: 1.35; font-size: 0.92rem; }
.col-plus { background: #e7f5ee; color: #0d4d30; }
.col-minus { background: #fde8e4; color: #7a241c; }
.col-minus:has(p) { background: #f6f1e8; color: var(--muted); }
.track span.tone-mid { background: #d0891e; }
.track span.tone-bad { background: #c2412d; }
.more { margin-top: 14px; }
.more summary { cursor: pointer; font-weight: 800; color: var(--green-deep); }
.more p { margin: 8px 0 0; line-height: 1.5; font-weight: 500; color: var(--ink); }
.reasons svg { flex: none; margin-top: 2px; }
.v-buy .badge-icon { background: var(--green-soft); color: var(--green); }
.v-ok .badge-icon { background: #e7f0ea; color: var(--green-deep); }
.v-caution .badge-icon { background: var(--amber-soft); color: var(--amber); }
.v-avoid .badge-icon { background: var(--red-soft); color: var(--red); }
.v-insufficient .badge-icon { background: #eeeae4; color: var(--slate); }

.group-title {
    margin: 8px 2px 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.catalog { padding: 16px 18px 18px; }
.catalog-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.catalog h3 { margin: 0; font-size: 1.05rem; }
.chip {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    background: #efeae2;
    color: var(--muted);
}
.chip.found { background: var(--green-soft); color: var(--green-deep); }
.chip.bad { background: var(--red-soft); color: var(--red); }
.note { margin: 10px 0 0; color: var(--muted); font-weight: 600; }
.prose { margin: 12px 0 0; max-width: 68ch; line-height: 1.65; font-weight: 500; overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fact {
    overflow-wrap: anywhere;
    line-height: 1.4;
    background: #f6f1e8;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 0.86rem;
    font-weight: 700;
}
.bars { display: grid; gap: 8px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 0.86rem; font-weight: 700; }
.track { height: 6px; border-radius: 99px; background: #efe8dc; grid-column: 1 / -1; overflow: hidden; }
.track span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.worth { margin: 12px 0 0; padding-left: 18px; }
.worth li { margin: 4px 0; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.links a, .text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 800;
    background: var(--green-soft);
    color: var(--green-deep);
    border-radius: 999px;
    padding: 8px 12px;
}

.hits { display: grid; gap: 10px; }
.hit {
    width: 100%;
    text-align: left;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 0;
    background: transparent;
}
.hit img, .hit .ph {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: contain;
    background: #f7f1e6;
}
.hit-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.hit-copy strong { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.hit-src { color: var(--muted); font-weight: 600; font-size: 0.82rem; }
.brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    background: #e7f5ee;
    color: #0d4d30;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}
.rate { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: #8a6208; font-weight: 800; }
.starline { position: relative; display: inline-block; font-size: 0.92rem; letter-spacing: 1px; line-height: 1; }
.starline-bg { color: #e6dccb; }
.starline-fg { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #e2a30b; }

.skeleton {
    height: 148px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(255,252,247,.4), rgba(255,252,247,.9), rgba(255,252,247,.4));
    background-size: 200% 100%;
    animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 22px; color: var(--muted); font-weight: 700; }

.foot {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.scanner {
    position: fixed;
    inset: 0;
    z-index: 5;
    background: rgba(20, 16, 12, 0.72);
    display: grid;
    place-items: center;
    padding: 18px;
}
.scanner[hidden] { display: none; }
.scanner-card {
    width: min(460px, 100%);
    background: #16130f;
    color: white;
    border-radius: 28px;
    padding: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.scanner-top { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; }
.viewfinder { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.frame {
    position: absolute;
    inset: 16% 12%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.28);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { border-color: #8ddebe; } }
.scan-note { margin: 10px 6px 4px; color: rgba(255,255,255,.75); font-size: 0.9rem; }

@media (max-width: 720px) {
    .pill { display: none; }
    .finder { grid-template-columns: 1fr 1fr; }
    .finder-field { grid-column: 1 / -1; }
    .product { grid-template-columns: 148px 1fr; gap: 12px; }
    .shot { width: 148px; height: 148px; }
    .product h2 { font-size: 1.35rem; }
    .split, .summary { grid-template-columns: 1fr; }
    .hit { grid-template-columns: 56px minmax(0, 1fr); }
    .hit img, .hit .ph { width: 56px; height: 56px; }
    .rate { grid-column: 2; flex-direction: row; align-items: center; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
