/* Anominal Foundry · Scan view. Scoped to [data-foundry-view="product"]; the shell styles the product bar. */
[data-foundry-view="product"] { --green: #5FCC9D; --line: rgba(255,255,255,0.12); --panel: rgba(255,255,255,0.035); --t2: rgba(255,255,255,0.72); --t3: rgba(255,255,255,0.52); }
.pr { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 32px 56px; display: grid; gap: 22px; }
.pr *, .pr *::before, .pr *::after { box-sizing: border-box; }
.pr-k { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); font-weight: 500; }
.pr h1 { margin: 8px 0 0; font-size: clamp(1.75rem, 2.4vw + 1rem, 2.75rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.12; }
.pr h1 em, .pr h2 em { font-style: normal; color: var(--green); }
.pr h2 { margin: 6px 0 4px; font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem); font-weight: 500; letter-spacing: -0.01em; }
.pr-coral { margin: 8px 0 0; color: var(--coral); font-size: clamp(1rem, 0.4vw + 0.9rem, 1.2rem); font-weight: 500; line-height: 1.4; }
.pr-fine { margin: 6px 0 0; font-size: 13px; color: var(--t3); }
.pr-btn { font: inherit; font-size: 14px; font-weight: 500; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--green); background: var(--green); color: #0A0E1A; cursor: pointer; white-space: nowrap; }
.pr-btn--ghost { background: transparent; color: var(--green); }
.pr-link { font: inherit; font-size: 13px; background: none; border: 0; padding: 0; color: var(--coral); cursor: pointer; text-decoration: underline; }
.pr-input { font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: #fff; min-width: 0; }

/* Step 1: scan */
.pr-scan { display: grid; gap: 12px; }
.pr-scan--compact { padding: 18px 20px; border-radius: 14px; border: 1px dashed var(--line); }
.pr-scan__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.pr-code { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; }
.pr-code .pr-input { flex: 1; }
.pr-samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pr-sample { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 150ms; }
.pr-sample:hover { border-color: rgba(95,204,157,0.5); }
.pr-sample[aria-pressed="true"] { border-color: var(--green); background: rgba(95,204,157,0.08); }
.pr-sample__qr { width: 84px; height: 84px; padding: 0; border-radius: 6px; background: #fff; display: block; }
.pr-sample__qr svg, .pr-prod__qr svg { width: 100%; height: 100%; display: block; }
.pr-sample small { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t3); }
.pr-sample b { display: block; font-size: 16px; font-weight: 500; margin: 2px 0; }
.pr-sample i { font-style: normal; font-size: 12px; color: var(--green); font-weight: 500; }
.pr-scan--compact .pr-sample { grid-template-columns: 52px 1fr; padding: 8px 10px; }
.pr-scan--compact .pr-sample__qr { width: 60px; height: 60px; padding: 0; }

/* Steps 2 and 3 */
.pr-step { padding: 22px; border-radius: 14px; border: 1px solid rgba(95,204,157,0.4); background: rgba(95,204,157,0.06); }
.pr-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.pr-role { display: grid; gap: 4px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(10,14,26,0.6); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pr-role:hover { border-color: var(--coral); }
.pr-role b { font-size: 18px; font-weight: 500; }
.pr-role span { font-size: 13.5px; color: var(--t2); }
.pr-role small { font-size: 12px; color: var(--t3); }
.pr-offer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.pr-offer > div:first-child { flex: 1 1 480px; }
.pr-offer__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.pr-addform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: 10px; margin-top: 12px; }

/* The record */
.pr-record { display: grid; gap: 18px; }
.pr-prod { display: grid; grid-template-columns: 160px 1fr 120px; gap: 20px; align-items: center; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.pr-prod__img { width: 160px; height: 120px; border-radius: 10px; background-size: cover; background-position: center; }
.pr-prod__qr { width: 120px; height: 120px; padding: 0; border-radius: 8px; background: #fff; display: block; }
.pr-ids { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 0; font-size: 13px; }
.pr-ids dt { color: var(--t3); } .pr-ids dd { margin: 0 0 0 -12px; color: #fff; }
.pr-as { margin: 10px 0 0; font-size: 13.5px; color: var(--t2); }
.pr-as b { color: #fff; font-weight: 500; }
.pr-lvnav { position: sticky; top: calc(var(--site-nav-h, 0px) + 64px); z-index: 4; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(10,14,26,0.92); backdrop-filter: blur(6px); }
.pr-lvnav a { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 10px; border-radius: 8px; color: var(--t2); text-decoration: none; font-weight: 500; font-size: 14px; text-align: center; }
.pr-lvnav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.pr-lvnav a[aria-current] { background: var(--coral); color: #2A1208; }
.pr-yours { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(95,204,157,0.16); color: var(--green); font-weight: 500; vertical-align: 3px; margin-left: 8px; }
.pr-lvnav a[aria-current] .pr-yours { background: rgba(42,18,8,0.15); color: #2A1208; }
.pr-level { scroll-margin-top: calc(var(--site-nav-h, 0px) + 130px); padding: 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); display: grid; gap: 16px; }
.pr-lvhead h3 { margin: 6px 0 0; font-size: clamp(1.4rem, 1vw + 1.1rem, 1.85rem); font-weight: 500; }
.pr-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pr-group { padding: 14px 16px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.pr-group h4, .pr-added h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); font-weight: 500; }
.pr-dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; line-height: 1.45; }
.pr-dl dt { color: var(--t3); } .pr-dl dd { margin: 0; color: #fff; }
.pr-added { padding: 14px 16px; border-radius: 10px; border: 1px dashed rgba(240,153,123,0.6); background: rgba(240,153,123,0.06); }
.pr-added h4 { color: var(--coral); }
.pr-deeper { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pr-deeper a { font-size: 13.5px; font-weight: 500; color: var(--green); text-decoration: none; }
.pr-deeper a:hover { text-decoration: underline; }
.pr-dist { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pr-map { height: 340px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #111827; }
.pr-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.pr-legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pr-legs li { display: grid; gap: 3px; padding: 10px 12px; border-left: 3px solid var(--green); background: rgba(255,255,255,0.03); border-radius: 0 8px 8px 0; }
.pr-legs li:nth-child(2) { border-left-color: var(--coral); } .pr-legs li:nth-child(3) { border-left-color: #D89812; }
.pr-leg__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pr-leg__top b { font-size: 13.5px; font-weight: 500; }
.pr-leg__amt { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-legs small { font-size: 12px; color: var(--t2); line-height: 1.45; }
.pr-issue { margin: 6px 0 0; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(240,153,123,0.55); background: rgba(240,153,123,0.07); font-size: 13px; color: #fff; }
.pr-outlets { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.pr-outlet { padding: 14px 16px; border-radius: 10px; border: 1px solid rgba(95,204,157,0.35); background: rgba(95,204,157,0.05); display: grid; gap: 8px; }
.pr-outlet b { font-size: 15px; font-weight: 500; }
.pr-outlet small { font-size: 12.5px; color: var(--t2); }
.pr-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pr-nums span { font-size: 15px; font-weight: 500; }
.pr-nums i { display: block; font-style: normal; font-size: 11px; color: var(--t3); font-weight: 400; }

.pr-cam { border: 1px solid var(--line); border-radius: 14px; background: #0F1626; color: #fff; padding: 0; max-width: 560px; width: calc(100vw - 32px); }
.pr-cam::backdrop { background: rgba(0,0,0,0.6); }
.pr-cam__in { display: grid; gap: 12px; padding: 18px; }
.pr-cam video { width: 100%; border-radius: 10px; background: #000; }
.pr-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); padding: 10px 16px; border-radius: 8px; background: #1C2533; border: 1px solid var(--line); color: #fff; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity 200ms, transform 200ms; z-index: 60; max-width: calc(100vw - 32px); }
.pr-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Product bar additions: the three top levels, the role switch and the scan button */
.bf-switch a strong { white-space: nowrap; }
@media (max-width: 1600px) { .bf-switch a span { display: none; } .bf-switch a { padding: 9px 14px; } }
.role-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 6px; border: 1px solid var(--border-faint); }
.role-toggle > span { font-size: 11px; color: var(--white-50); padding: 0 6px 0 4px; white-space: nowrap; }
.role-toggle .view-btn { padding: 8px 12px; }
.scan-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 7px; background: #5FCC9D; color: #0A0E1A; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }

@media (max-width: 980px) {
  .pr { padding: 20px 16px 40px; }
  .pr-samples, .pr-roles, .pr-groups, .pr-dist, .pr-addform { grid-template-columns: 1fr; }
  .pr-prod { grid-template-columns: 1fr; }
  .pr-prod__img { width: 100%; height: 160px; }
  .pr-prod__qr { width: 96px; height: 96px; }
  .pr-lvnav { top: 8px; }
  .pr-lvnav a { font-size: 12.5px; padding: 8px 4px; }
  .pr-dl { grid-template-columns: 110px 1fr; }
  .pr-map { height: 260px; }
}

@media (max-width: 760px) {
  .bf-switch a strong { white-space: normal; font-size: 12.5px; line-height: 1.25; }
  .bf-switch a { padding: 7px 8px; text-align: center; }
  .role-toggle { width: 100%; justify-content: space-between; }
}
