/* QRMA evaluator — tool (consent + upload) and the rendered result.
   Scoped under .qrma-tool / .qrma-result so it never clashes with the site theme.
   Presentation only — contains NO business data. */

/* ---------- tool: consent + upload ---------- */
.qrma-tool { margin: 0 0 6px; }
.qrma-consent {
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-gold);
    border-radius: var(--radius);
    background: var(--color-surface-soft);
    padding: 1.1rem 1.2rem;
}
.qrma-consent h4 { margin: 0 0 0.4rem; color: var(--color-green); font-size: 1.05rem; }
.qrma-consent p { margin: 0 0 0.7rem; color: var(--color-ink-soft); font-size: 0.92rem; line-height: 1.6; }
.qrma-consent a { color: var(--color-green); font-weight: 700; }
.qrma-consent-check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.92rem; margin: 0 0 0.8rem; cursor: pointer; }
.qrma-drop {
    border: 1.5px dashed #35463d;
    border-radius: 16px;
    background: #ffffff;
    padding: 34px 22px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.qrma-drop:hover, .qrma-drop.over { border-color: var(--color-green); background: rgba(37,215,150,0.08); }
.qrma-drop-ic { font-size: 2rem; display: block; }
.qrma-drop b { display: block; margin: 0.5rem 0 0.25rem; color: var(--color-green); }
.qrma-drop p { margin: 0; color: var(--color-muted); font-size: 0.85rem; }
.qrma-status { margin: 0.7rem 0 0; font-weight: 750; color: var(--color-ink-soft); min-height: 1.2em; }
/* Prominent limit banner — a quota / hourly-cap hit must be impossible to miss. */
.qrma-limit-note {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: #fdf1cd;
    border: 2px solid #e0bf62;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin: 0 0 0.9rem;
    color: #6d4e05;
    font-weight: 750;
    font-size: 0.98rem;
    line-height: 1.45;
    box-shadow: 0 10px 24px -14px rgba(168, 112, 10, 0.45);
}
.qrma-limit-ic { font-size: 1.6rem; flex: 0 0 auto; }
/* Error variant (e.g. wrong file format / a folder was dropped): red instead of amber. */
.qrma-limit-note.is-error {
    background: #fcecec;
    border-color: #d9776b;
    color: #8a2f22;
    box-shadow: 0 10px 24px -14px rgba(168, 40, 25, 0.4);
}
.qrma-limit-note.is-pop { animation: qrmaLimitPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes qrmaLimitPop { from { transform: scale(0.94); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qrma-limit-note.is-pop { animation: none; } }

/* Stored-upload history — each entry is its own card so the report info and its
   action buttons read as one group, clearly separated from the next entry. */
.qrma-history { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--color-border); }
.qrma-history h4 { margin: 0 0 0.25rem; color: var(--color-green); font-size: 1rem; }
.qrma-history-hint { margin: 0 0 0.8rem; color: var(--color-muted); font-size: 0.85rem; }
.qrma-history ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.qrma-history li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem 1.1rem;
    flex-wrap: wrap;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    padding: 0.7rem 0.9rem;
    box-shadow: var(--shadow-subtle);
}
.qrma-history-info { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; flex: 1 1 14rem; }
.qrma-history-name { font-weight: 750; color: var(--color-ink); word-break: break-word; line-height: 1.35; }
.qrma-history-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.qrma-history-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; flex: 0 0 auto; }
.qrma-history small { color: var(--color-muted); }
.qrma-rerun-btn { padding: 0.32rem 0.8rem; font-size: 0.82rem; flex: 0 0 auto; }
/* run-settings badge on history rows (products / vitamin / language) */
.qrma-history-set { display: inline-block; padding: 0.08rem 0.5rem; border-radius: 999px; background: rgba(37, 215, 150, 0.1); border: 1px solid rgba(37, 215, 150, 0.25); color: var(--color-ink-soft); font-size: 0.76rem; white-space: nowrap; }
.qrma-open-btn { border-color: rgba(37, 215, 150, 0.5); }

.qrma-tools { display: grid; gap: 1.3rem; margin-top: 0.2rem; }
/* sub-tabs: evaluator / translator, one at a time */
.qrma-subtabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.1rem 0 0.2rem; }
.qrma-subtab { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-ink-soft); font: inherit; font-weight: 750; font-size: 0.92rem; padding: 0.55rem 1.1rem; border-radius: 999px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.qrma-subtab:hover { border-color: var(--color-green); color: var(--color-green); }
.qrma-subtab.is-active { background: var(--color-green-deep); color: #fff; border-color: var(--color-green-deep); }
.qrma-subpanel { display: none; }
.qrma-subpanel.is-active { display: block; }
.qrma-lead { margin: 0 0 0.9rem; color: var(--color-ink-soft); font-size: 0.95rem; line-height: 1.6; }
.qrma-lead b { color: var(--color-green); }
.qrma-quota { margin: 0; font-size: 0.86rem; color: var(--color-ink-soft); background: rgba(37, 215, 150, 0.08); border: 1px solid rgba(37, 215, 150, 0.22); border-radius: var(--radius); padding: 0.6rem 0.9rem; }
.qrma-quota b { color: var(--color-green-bright); }
.qrma-subtool { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-subtle); }
.qrma-subtool h4 { margin: 0 0 0.25rem; color: var(--color-green); font-size: 1.08rem; }
.qrma-subtool > p { margin: 0 0 0.8rem; color: var(--color-muted); font-size: 0.92rem; }
.qrma-langsel { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 700; color: var(--color-ink-soft); margin: 0 0 0.7rem; }
.qrma-langsel select { font: inherit; border: 1px solid var(--color-border); border-radius: 8px; padding: 0.35rem 0.6rem; background: #ffffff; }
/* Translator version picker — rendered ONLY for members the admin enabled for the EU/MDR
   test, so it must read as a quiet test affordance, not a headline feature. */
.qrma-vercho { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.9rem; font-size: 0.85rem; color: var(--color-ink-soft); background: #faf8f4; border: 1px solid #e6e0d2; border-left: 3px solid #b9a37e; border-radius: 10px; padding: 0.5rem 0.75rem; margin: 0 0 0.7rem; }
.qrma-vercho-l { font-weight: 700; }
.qrma-vercho label { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.qrma-vercho-h { flex-basis: 100%; font-size: 0.78rem; color: var(--color-ink-faint, #8a8578); }
.qrma-frame { margin-top: 1rem; }
.qrma-frame-bar { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.qrma-frame-bar .button { white-space: nowrap; flex: 0 0 auto; }
.qrma-savepdf-hint { flex: 1 1 260px; min-width: 220px; margin: 0; font-size: 0.86rem; line-height: 1.45; color: var(--color-muted); }
.qrma-frame iframe { width: 100%; height: 75vh; border: 1px solid var(--color-border); border-radius: 12px; background: #ffffff; }

/* ---------- the rendered evaluation (scoped) ---------- */
.qrma-result {
    --ink: #1d1d1f; --muted: #6e6e73; --faint: #8a8a8f; --line: #e8e8ed; --hair: #f0f0f3;
    --card: #ffffff; --accent: #127a55; --brand: #168f63; --brand-dark: #0f6e4b;
    --red: #c4362c; --redbg: #fbeeed; --redln: #f0d6d2;
    --amber: #9a6410; --amberbg: #fbf3e4; --amberln: #eee0c6;
    --green: #1d8a4e; --greenbg: #e9f6ef; --greenln: #d0e9da;
    margin-top: 1.1rem;
}
.qrma-result .report { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px 30px; color: var(--ink); line-height: 1.6; }
.qrma-result .rhead { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--hair); padding-bottom: 18px; margin-bottom: 20px; gap: 14px; flex-wrap: wrap; }
.qrma-result .brand { display: flex; align-items: center; gap: 12px; }
.qrma-result .brand .bn { font-size: 17px; font-weight: 600; letter-spacing: -.015em; color: var(--brand-dark); line-height: 1.15; }
.qrma-result .brand .t2 { font-size: 12.5px; color: var(--faint); margin-top: 3px; }
.qrma-result .meta { text-align: right; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.qrma-result .meta b { color: var(--ink); font-weight: 600; }
.qrma-result .metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 6px; }
.qrma-result .metric { border-radius: 16px; padding: 15px 17px; }
.qrma-result .metric .l { font-size: 12px; font-weight: 500; opacity: .9; }
.qrma-result .metric .n { font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; margin-top: 2px; }
.qrma-result .m-all { background: #f1f1f4; color: var(--ink); }
.qrma-result .m-red { background: var(--redbg); color: var(--red); }
.qrma-result .m-amber { background: var(--amberbg); color: var(--amber); }
.qrma-result .m-green { background: var(--greenbg); color: var(--green); }
.qrma-result .summary { font-size: 14.5px; line-height: 1.65; margin: 20px 0 4px; }
.qrma-result .summary .lbl { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 7px; }
.qrma-result h2.sec { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 30px 0 13px; display: flex; align-items: center; gap: 8px; }
.qrma-result h2.sec .dot { width: 8px; height: 8px; border-radius: 50%; }
.qrma-result .dot.red { background: var(--red); } .qrma-result .dot.amber { background: var(--amber); }
.qrma-result h2.sec .seccov { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.qrma-result h2.sec .seccov b { color: var(--green); }
.qrma-result .crit { display: flex; flex-direction: column; gap: 10px; }
.qrma-result .crit .row { border: 1px solid var(--redln); border-radius: 14px; padding: 15px 17px; }
.qrma-result .crit .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.qrma-result .crit .nm { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.qrma-result .crit .nm small { color: var(--faint); font-weight: 400; }
.qrma-result .badge { font-size: 11px; font-weight: 600; padding: 3px 11px; border-radius: 980px; white-space: nowrap; }
.qrma-result .b-red { background: var(--red); color:#fff; }
.qrma-result .crit .val { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.qrma-result .crit .desc { font-size: 13.5px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
.qrma-result .watch { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.qrma-result .watch .w { background: var(--hair); border-radius: 11px; padding: 10px 13px; font-size: 13px; }
.qrma-result .watch .w small { color: var(--faint); }
.qrma-result .watch .w.cov { background: var(--greenbg); border: 1px solid var(--greenln); }
.qrma-result .ck { color: var(--green); font-weight: 700; }
/* Coverage by the vitamin-household box is shown in a light-iris accent (vs. the green
   of the targeted products), and the WHOLE covered item is tinted — not just the ✓ — so
   it's easy to see at a glance which areas the multivitamin influences. */
.qrma-result .ck.vbox { color: #7c53c9; }
.qrma-result .bodyleg .bl-row.vbox > span:last-child { color: #7c53c9; font-weight: 600; }
.qrma-result .watch .w.cov.vbox { background: #f4effd; border-color: #e2d5f6; }
.qrma-result .crit .covline.yes.vbox { background: #f4effd; color: #6a45bd; }
.qrma-result .crit .covline.yes.vbox b { color: #6a45bd; }
.qrma-result .watchlegend { font-size: 11px; color: var(--faint); margin-top: 9px; }
.qrma-result .okbar { display: flex; gap: 10px; align-items: center; background: var(--greenbg); color: var(--green); border-radius: 14px; padding: 13px 16px; font-size: 13.5px; margin-top: 14px; }
.qrma-result .callout { background: linear-gradient(135deg, #eef7f2, #ebf6ef); border: 1px solid #d2e8dd; border-radius: 16px; padding: 15px 18px; margin: 4px 0 16px; font-size: 13.5px; color: #2f5647; line-height: 1.6; }
.qrma-result .callout b { color: var(--brand-dark); font-weight: 600; }
.qrma-result .proddisc { font-size: 12px; color: #6a5a2e; background: #fbf7ea; border: 1px solid #efe4c2; border-radius: 12px; padding: 10px 14px; margin: 0 0 16px; line-height: 1.55; }
/* EU/MDR: up-front notice + the generated-values caption. It must be impossible to miss
   (the whole report is software-generated, non-validated indices) — but the register is a
   calm, professional INFO box, not a red alarm: the notice is about the DOCUMENT, not the
   reader's health, and a danger-styled block made people think something was wrong with
   them (owner, 2026-07-16). Sand/gold accent = the brand's "important note" language. */
.qrma-result .qrma-warn { background: #faf8f4; border: 1px solid #e6e0d2; border-left: 4px solid #b9a37e; border-radius: 12px; padding: 13px 16px; margin: 14px 0 4px; }
.qrma-result .qrma-warn .qw-h { font-size: 12.5px; font-weight: 700; color: #3a3529; margin-bottom: 5px; letter-spacing: 0.01em; }
.qrma-result .qrma-warn .qw-b { font-size: 12px; color: #5b5548; line-height: 1.6; }
.qrma-result .qrma-gennote { font-size: 11.5px; color: var(--faint); background: #f7f7f6; border: 1px solid var(--hair); border-radius: 10px; padding: 9px 13px; margin: 12px 0 2px; line-height: 1.55; }
.qrma-result .prods { display: flex; flex-direction: column; gap: 12px; }
.qrma-result .prod { border: 1px solid var(--line); border-radius: 16px; padding: 15px 17px; display: flex; gap: 16px; align-items: flex-start; }
.qrma-result .pimg { width: 82px; height: 82px; flex-shrink: 0; object-fit: contain; border-radius: 13px; background: #fafafa; border: 1px solid var(--hair); padding: 4px; }
.qrma-result .pbody { flex: 1; min-width: 0; }
.qrma-result .prod .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.qrma-result .prod .pn { font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; }
.qrma-result .prod .pp { color: var(--muted); font-size: 13px; white-space: nowrap; }
.qrma-result .prod .pd { font-size: 12.8px; color: #444; margin-top: 5px; line-height: 1.55; }
.qrma-result .prod .pmeta { font-size: 11.5px; color: #555; margin-top: 8px; line-height: 1.5; background: var(--hair); border-radius: 9px; padding: 7px 10px; }
.qrma-result .prod .pm { font-size: 11.5px; color: var(--faint); margin-top: 7px; }
.qrma-result .prod .pm b { color: var(--green); font-weight: 600; }
.qrma-result .priceblock { display: flex; justify-content: flex-end; align-items: baseline; gap: 13px; margin-top: 14px; font-size: 13.5px; }
.qrma-result .priceblock .retail { color: var(--faint); text-decoration: line-through; }
.qrma-result .priceblock .member b { color: var(--green); font-size: 17px; font-weight: 600; }
.qrma-result .pricenote { text-align: right; font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.qrma-result .planintro { margin: -4px 0 13px; font-size: 12.5px; color: var(--muted); }
.qrma-result .plannote { font-size: 12.5px; color: #2f5647; background: #eef7f2; border: 1px solid #d2e8dd; border-radius: 12px; padding: 11px 14px; margin: 0 0 14px; line-height: 1.6; }
.qrma-result .plan .ph .pl.cont { color: var(--faint); font-style: italic; }
.qrma-result .plan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.qrma-result .plan6m { grid-template-columns: repeat(2, 1fr); }
.qrma-result .plan .ph { background: var(--hair); border-radius: 14px; padding: 14px 15px; border-top: 3px solid; }
.qrma-result .plan .ph .pp { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); }
.qrma-result .plan .ph .pl { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.qrma-result .plan .ph .pl b { color: var(--ink); font-weight: 600; }
.qrma-result .plan .ph .cost { font-size: 13px; font-weight: 600; color: var(--green); margin-top: 8px; }
.qrma-result .pthumbs { display: flex; flex-wrap: wrap; gap: 9px; margin: 5px 0 3px; }
.qrma-result .pthumb { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 60px; }
.qrma-result .pthumb img { width: 54px; height: 54px; object-fit: contain; border-radius: 12px; background: #fafafa; border: 1px solid var(--hair); padding: 3px; }
.qrma-result .pthumb span { font-size: 9px; color: var(--muted); text-align: center; line-height: 1.12; font-weight: 600; }
.qrma-result .plan6 { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, #eafaf1, #e7f6ee); border: 1px solid var(--greenln); border-radius: 14px; padding: 14px 18px; margin-top: 13px; font-size: 13.5px; }
.qrma-result .plan6 .big { font-size: 22px; font-weight: 600; color: var(--green); letter-spacing: -.02em; white-space: nowrap; }
.qrma-result .plan6detail { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.qrma-result .maint { display: flex; gap: 9px; align-items: flex-start; background: var(--hair); border-radius: 14px; padding: 13px 16px; margin-top: 14px; font-size: 12.8px; color: #444; line-height: 1.55; }
.qrma-result .maint b { color: var(--ink); }
.qrma-result .brandfoot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--brand-dark); font-weight: 500; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--hair); }
.qrma-result .brandfoot .u { color: var(--faint); font-weight: 400; }
.qrma-result .disc { font-size: 11.5px; color: var(--faint); margin-top: 26px; border-top: 1px solid var(--hair); padding-top: 14px; line-height: 1.55; }
/* Ownership stamp — subtle, but present in the exported PDF for traceability. */
.qrma-result .ownstamp { font-size: 10.5px; color: var(--faint); margin-top: 10px; letter-spacing: .02em; }

/* ---------- v2 result sections (body figure, coverage, vitamin box, tea note) ---------- */
.qrma-result h2.sec .seccov.red b { color: var(--red); }
.qrma-result .crit .critexpl { font-size: 12.8px; color: #7a3b3b; margin-top: 8px; line-height: 1.6; padding: 9px 12px; background: var(--redbg); border: 1px solid var(--redln); border-radius: 10px; }
/* topic deep-dive on critical cards (2–3 sentences from the module expert advice) */
.qrma-result .crit .critadvice { font-size: 13px; color: #3f4a44; margin-top: 8px; line-height: 1.6; padding: 9px 12px; background: #f4f8f5; border: 1px solid #dcebe2; border-radius: 10px; }
.qrma-result .crit .covline { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12px; padding: 6px 10px; border-radius: 9px; }
.qrma-result .crit .covline.yes { background: var(--greenbg); color: var(--green); }
.qrma-result .crit .covline.yes b { color: var(--green); font-weight: 600; }
.qrma-result .crit .covline.no { background: #f7f7f9; color: var(--muted); }
.qrma-result .crit .covline.offer { background: #fbf4e6; color: #8a6d1e; }
.qrma-result .crit .covline.offer b { color: #7a5e12; font-weight: 600; }
.qrma-result .watch .wtop { font-weight: 500; }
.qrma-result .watch .wg { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.qrma-result .teanote { display: flex; gap: 9px; align-items: flex-start; background: #eef7f2; border: 1px solid #d2e8dd; border-radius: 14px; padding: 12px 15px; margin-top: 12px; font-size: 12.8px; color: #28352e; line-height: 1.55; }
.qrma-result .teanote b { color: var(--brand-dark); font-weight: 600; }

/* anatomical body figure + legend */
.qrma-result .bodywrap { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, #fbfbfd, #f1f7f4); border: 1px solid var(--hair); border-radius: 18px; padding: 14px 18px; margin: 20px 0 6px; }
.qrma-result .bodyfig-wrap { position: relative; flex-shrink: 0; width: 172px; }
.qrma-result .bodyfig { width: 172px; height: auto; display: block; }
.qrma-result .bodyfig .bf-body { fill: #eef4f0; stroke: #cdddd3; stroke-width: 1.6; stroke-linejoin: round; }
.qrma-result .bodyfig [data-o] { color: #9db3a7; opacity: 0.20; transition: opacity 0.25s, color 0.25s, filter 0.25s; }
.qrma-result .bodyfig [data-o].on-red { color: var(--red); opacity: 1; filter: drop-shadow(0 0 6px rgba(196,54,44,0.55)); transform-box: fill-box; transform-origin: center; animation: bfPulse 2s ease-in-out infinite; }
.qrma-result .bodyfig [data-o].on-amber { color: var(--amber); opacity: 1; filter: drop-shadow(0 0 5px rgba(154,100,16,0.5)); transform-box: fill-box; transform-origin: center; animation: bfPulse 2.5s ease-in-out infinite; }
.qrma-result .bodyfig .bf-child { fill: #cdd9d0; opacity: 0.5; transition: fill 0.25s, opacity 0.25s, filter 0.25s; }
/* Kids evaluation: light up the small child silhouette as a visual cue. */
.qrma-result .bodyfig .bf-child.is-kid { fill: var(--brand); opacity: 1; filter: drop-shadow(0 0 7px rgba(22,143,99,0.6)); transform-box: fill-box; transform-origin: center; animation: bfPulse 2.2s ease-in-out infinite; }
.qrma-result .bodyfig .orgck circle { fill: var(--green); stroke: #fff; stroke-width: 1.3; }
.qrma-result .bodyfig .orgck path { fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@keyframes bfPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.72; transform: scale(1.05); } }
.qrma-result .bm-scan { position: absolute; left: 6%; right: 6%; top: 3%; height: 2px; border-radius: 2px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(22,143,99,0.5) 30%, rgba(22,143,99,0.5) 70%, transparent); box-shadow: 0 0 8px rgba(22,143,99,0.35); animation: bmScan 5s ease-in-out infinite; }
@keyframes bmScan { 0% { top: 3%; opacity: 0; } 8% { opacity: 1; } 50% { top: 88%; opacity: 1; } 92% { opacity: 1; } 100% { top: 3%; opacity: 0; } }
.qrma-result .bodyleg { flex: 1; min-width: 0; font-size: 12.5px; color: #3a3a3c; }
.qrma-result .bodyleg .bl-h { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin-bottom: 8px; }
.qrma-result .bodyleg .bl-row { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; line-height: 1.4; }
.qrma-result .bodyleg .bl-d { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.qrma-result .bodyleg .bl-d.r { background: var(--red); }
.qrma-result .bodyleg .bl-d.a { background: var(--amber); }
.qrma-result .bodyleg .sys { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.qrma-result .bodyleg .sys b { color: var(--ink); font-weight: 600; }
.qrma-result .bodyleg .bl-ok { color: var(--green); font-weight: 500; }

/* separate vitamin-household box */
.qrma-result .vitbox { background: linear-gradient(135deg, #fff8ec, #fef4e2); border: 1px solid var(--amberln); border-radius: 18px; padding: 16px 20px; margin-top: 14px; display: flex; gap: 16px; align-items: flex-start; }
.qrma-result .vitbox .vimg { width: 74px; height: 74px; flex-shrink: 0; object-fit: contain; border-radius: 13px; background: #fff; border: 1px solid var(--amberln); padding: 5px; }
.qrma-result .vitbox .vb-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--amber); display: flex; align-items: center; gap: 6px; }
.qrma-result .vitbox .vb-n { font-weight: 600; font-size: 15.5px; margin: 4px 0 2px; letter-spacing: -0.01em; }
.qrma-result .vitbox .vb-n .pp { color: var(--muted); font-size: 13px; font-weight: 400; }
.qrma-result .vitbox .vb-d { font-size: 12.8px; color: #4a4033; margin-top: 4px; line-height: 1.55; }
.qrma-result .vitbox .vb-w { font-size: 11.5px; color: #7a5a12; margin-top: 7px; }
.qrma-result .vitbox .vb-w b { color: var(--amber); font-weight: 600; }

/* product-image zoom affordance (lightbox trigger) */
.qrma-result .zoom { cursor: zoom-in; transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s; }
.qrma-result .zoom:hover { border-color: var(--greenln); box-shadow: 0 6px 16px rgba(0,0,0,0.09); transform: scale(1.03); }
.qrma-result .pthumb.zoom:hover { transform: translateY(-2px); box-shadow: none; }

@media (max-width: 620px) {
    .qrma-result .metrics { grid-template-columns: repeat(2, 1fr); }
    .qrma-result .watch, .qrma-result .plan { grid-template-columns: 1fr; }
    .qrma-result .bodywrap { flex-direction: column; align-items: center; }
    .qrma-result .vitbox { flex-direction: column; align-items: flex-start; }
}

/* ---------- evaluator upload options (3/4 products + vitamin box toggle) ---------- */
.qrma-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.2rem; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: 12px; padding: 0.65rem 1rem; margin: 0 0 0.8rem; font-size: 0.88rem; color: var(--color-ink-soft); }
.qrma-opt { display: inline-flex; align-items: center; gap: 0.5rem; }
.qrma-opt b { color: var(--color-ink); font-weight: 700; }
.qrma-opt-vit { cursor: pointer; font-weight: 600; }
.qrma-seg { display: inline-flex; border: 1px solid var(--color-border); border-radius: 999px; overflow: hidden; background: #ffffff; }
.qrma-seg button { border: none; background: transparent; font: inherit; padding: 0.25rem 0.85rem; cursor: pointer; color: var(--color-muted); font-weight: 700; }
.qrma-seg button:hover { background: rgba(37, 215, 150, 0.1); }
.qrma-seg button.is-on { background: var(--color-green-deep); color: #fff; }

/* PDF export bar above the rendered result */
.qrma-result-bar { display: flex; justify-content: flex-end; margin: 0.9rem 0 0; }

/* two-step run bar: loaded-file chip + explicit start button (evaluator) */
.qrma-runbar { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 0.8rem 0 0; padding: 0.7rem 0.9rem; background: rgba(37, 215, 150, 0.07); border: 1px solid rgba(37, 215, 150, 0.28); border-radius: 12px; }
.qrma-runbar[hidden] { display: none; }
.qrma-file-chip { flex: 1 1 14rem; min-width: 0; font-size: 0.88rem; font-weight: 650; color: var(--color-ink-soft); overflow-wrap: anywhere; }

/* product lightbox */
.qrma-lightbox { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 1.2rem; background: rgba(9, 26, 19, 0.6); backdrop-filter: blur(4px); }
.qrma-lightbox[hidden] { display: none; }
.qrma-lb-card { position: relative; width: min(24rem, 100%); max-height: 88vh; overflow: auto; background: #ffffff; border-radius: 18px; padding: 1.4rem 1.4rem 1.2rem; text-align: center; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5); }
.qrma-lb-close { position: absolute; top: 0.5rem; right: 0.6rem; border: none; background: transparent; font-size: 1.5rem; line-height: 1; color: var(--color-muted); cursor: pointer; padding: 0.3rem; }
.qrma-lb-close:hover { color: var(--color-ink); }
.qrma-lb-img { width: min(15rem, 70%); height: auto; object-fit: contain; margin: 0 auto 0.7rem; display: block; }
.qrma-lb-name { font-weight: 750; font-size: 1.05rem; color: var(--color-ink); }
.qrma-lb-meta { font-size: 0.82rem; color: var(--color-muted); margin-top: 0.4rem; background: #f5f5f7; border-radius: 9px; padding: 0.45rem 0.7rem; }
.qrma-lb-meta:empty, .qrma-lb-desc:empty { display: none; }
.qrma-lb-desc { font-size: 0.88rem; color: var(--color-ink-soft); margin-top: 0.55rem; line-height: 1.55; text-align: left; }

/* clean PDF/print capture: freeze the ambient animations */
body.qrma-exporting .qrma-result .bm-scan { display: none !important; }
body.qrma-exporting .qrma-result .bodyfig [data-o],
body.qrma-exporting .qrma-result .bodyfig .bf-child.is-kid { animation: none !important; }
@media print {
    .qrma-opts, .qrma-result-bar, .qrma-lightbox, .qrma-drop, .qrma-status { display: none !important; }
    .qrma-result .bm-scan { display: none !important; }
    .qrma-result .bodyfig [data-o],
    .qrma-result .bodyfig .bf-child.is-kid { animation: none !important; }
    .qrma-result .report { border: none; border-radius: 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .qrma-result .bodyfig [data-o],
    .qrma-result .bodyfig .bf-child.is-kid { animation: none !important; }
    .qrma-result .bm-scan { display: none; }
}

/* ---------- standalone tools page (/hu/ai-eszkozok) ---------- */
.tools-page{display:grid;gap:1.1rem}
.tools-page-lead{margin:0;color:var(--color-ink-soft);font-size:1rem;line-height:1.65;max-width:44rem}
.tools-page-lead a{color:var(--color-green);font-weight:700}
.tools-page-links{display:flex;flex-wrap:wrap;gap:1.2rem;margin:1.1rem 0 0}
.tools-page-links a{color:var(--color-green);font-weight:750;text-decoration:none}
.tools-page-links a:hover{text-decoration:underline}

/* big tool-picker cards (replace the small pill sub-tabs on the standalone page) */
.qrma-picker{display:grid;gap:.8rem;grid-template-columns:1fr;margin:.2rem 0 .3rem}
.qrma-pick{display:flex;align-items:flex-start;gap:.85rem;text-align:left;border:1.5px solid var(--color-border);
  border-radius:var(--radius);background:var(--color-surface);padding:1rem 1.1rem;cursor:pointer;font:inherit;color:var(--color-ink);
  box-shadow:var(--shadow-subtle);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease}
.qrma-pick:hover{border-color:var(--color-border-strong);transform:translateY(-2px);box-shadow:var(--shadow-soft)}
.qrma-pick-ic{flex:0 0 auto;display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:13px;background:var(--color-green-pale);font-size:1.3rem}
.qrma-pick-txt{display:grid;gap:.2rem;line-height:1.4}
.qrma-pick-txt b{font-size:1.02rem;color:var(--color-ink)}
.qrma-pick-txt small{color:var(--color-muted);font-size:.86rem;font-weight:600}
.qrma-pick.is-active{border-color:var(--color-green);background:linear-gradient(160deg,rgba(22,160,106,.07),rgba(255,255,255,0)) ,var(--color-surface);box-shadow:0 10px 26px -14px rgba(15,125,84,.45)}
.qrma-pick.is-active .qrma-pick-ic{background:var(--color-green-deep);color:#fff}
.qrma-pick.is-active .qrma-pick-txt b{color:var(--color-green-deep)}
@media(min-width:640px){.qrma-picker{grid-template-columns:repeat(2,1fr)}}

/* ==================== AI PROCESSING OVERLAY (Vitalitás Labor) ==================== */
/* Full-screen "the AI is working" theatre: pulsing core, orbiting rings, staged
   checklist and an easing progress bar. Runs 9–16 s before the result reveals. */
.ai-overlay{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:1.2rem;
  background:rgba(9,26,19,.72);backdrop-filter:blur(6px)}
.ai-overlay[hidden]{display:none}
.ai-overlay-card{width:min(30rem,100%);text-align:center;border-radius:20px;padding:2rem 1.8rem 1.6rem;
  background:linear-gradient(170deg,#0d2b1f,#123527 65%,#0d2b1f);border:1px solid rgba(47,213,152,.28);
  color:#dcefe4;box-shadow:0 30px 80px -20px rgba(0,0,0,.6)}
.ai-brain{position:relative;width:92px;height:92px;margin:0 auto 1.1rem}
.ai-brain-core{position:absolute;inset:26px;border-radius:50%;
  background:radial-gradient(circle at 35% 35%,#5fe8b4,#16a06a 70%);
  box-shadow:0 0 24px rgba(47,213,152,.75);animation:aiCore 1.6s ease-in-out infinite}
.ai-ring{position:absolute;inset:0;border-radius:50%;border:2px solid transparent;
  border-top-color:rgba(47,213,152,.85);animation:aiSpin 1.4s linear infinite}
.ai-ring.r2{inset:8px;border-top-color:rgba(47,213,152,.5);animation-duration:2.1s;animation-direction:reverse}
.ai-ring.r3{inset:16px;border-top-color:rgba(47,213,152,.3);animation-duration:3s}
@keyframes aiSpin{to{transform:rotate(360deg)}}
@keyframes aiCore{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}
.ai-overlay-title{margin:0 0 .2rem;font-size:1.15rem;color:#fff;font-family:var(--font-display)}
.ai-overlay-file{margin:0 0 1rem;font-size:.8rem;color:rgba(220,239,228,.65);
  font-family:ui-monospace,Consolas,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-stage-list{display:grid;gap:.4rem;text-align:left;max-width:22rem;margin:0 auto 1.1rem;min-height:8rem}
.ai-stage{margin:0;display:flex;gap:.55rem;align-items:baseline;font-size:.9rem;color:rgba(220,239,228,.45);
  transition:color .3s ease}
.ai-stage-ic{width:1.1rem;flex:0 0 auto;text-align:center}
.ai-stage.is-active{color:#fff}
.ai-stage.is-active .ai-stage-ic{color:#2fd598;animation:aiBlink .9s ease-in-out infinite}
.ai-stage.is-done{color:rgba(220,239,228,.8)}
.ai-stage.is-done .ai-stage-ic{color:#2fd598}
@keyframes aiBlink{50%{opacity:.35}}
.ai-progress{height:8px;border-radius:999px;background:rgba(255,255,255,.12);overflow:hidden}
.ai-progress i{display:block;height:100%;width:0;border-radius:999px;
  background:linear-gradient(90deg,#16a06a,#2fd598);box-shadow:0 0 12px rgba(47,213,152,.6);
  transition:width .25s ease}
.ai-overlay-pct{margin:.45rem 0 0;font-weight:800;font-size:1rem;color:#2fd598;
  font-family:ui-monospace,Consolas,monospace}
.ai-overlay-hint{margin:.8rem 0 0;font-size:.76rem;color:rgba(220,239,228,.55)}
@media (prefers-reduced-motion: reduce){
  .ai-ring,.ai-brain-core,.ai-stage.is-active .ai-stage-ic{animation:none}
}

/* --- Icons (see _private/app/Icon.php) -------------------------------------
   These slots held emoji sized with font-size, which an inline SVG ignores, so
   each states its own size. The colours are inherited, which is the point: the
   limit note's icon turns amber or red with its banner, no extra rule needed. */
.qrma-drop-ic { display: block; color: var(--color-green); }
.qrma-drop-ic .icon { width: 2rem; height: 2rem; }

.qrma-limit-ic { display: flex; align-items: flex-start; }
.qrma-limit-ic .icon { width: 1.5rem; height: 1.5rem; }

.qrma-pick-ic { color: var(--color-green); }
.qrma-pick-ic .icon { width: 1.5rem; height: 1.5rem; }

.qrma-quota .icon,
.qrma-subtool h4 .icon,
.qrma-history-name .icon { vertical-align: -0.18em; color: var(--color-green); }
.qrma-quota .icon { width: 1.05rem; height: 1.05rem; }
.qrma-subtool h4 .icon { width: 1.2rem; height: 1.2rem; }
.qrma-history-name .icon { width: 1.05rem; height: 1.05rem; margin-right: 0.15rem; }

/* The file chip is a flex row: icon, then the file name in its own span. */
.qrma-file-chip { display: flex; align-items: center; gap: 0.4rem; }
.qrma-file-chip .icon { width: 1.1rem; height: 1.1rem; color: var(--color-green); }

/* Buttons that carry an icon before their label. No margin — .button is a flex row
   with its own gap, and a margin here would double the spacing. */
.button .icon { width: 1.05rem; height: 1.05rem; }

/* HALK mód: a riport iktatószáma. Jelentésen ez a legtermészetesebb elem — nincs
   felirata, nincs kerete, a lábléc metaadatai közé simul. A csempézett vízjel helyett
   (vagy mellett) ez bizonyít, anélkül hogy a tag figyelve érezné magát. */
.qrma-result .docref {
  font-size: 10px;
  color: var(--faint);
  letter-spacing: .04em;
  margin-top: 6px;
  font-family: ui-monospace, Consolas, monospace;
  opacity: .8;
}
