/* Business X-ray. Builds on ../styles.css (tokens, nav, buttons, form fields). */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.xr-back { display: inline-flex; }

/* ---------- entry ---------- */
.xr-hero { position: relative; min-height: 100vh; min-height: 100svh; padding: 150px 0 90px; overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255,52,8,0.16), transparent 70%), var(--void); }
.xr-grid { position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); }
.xr-hero .wrap { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.xr-hero h1 { font-size: clamp(48px, 9vw, 120px); margin-bottom: 24px; letter-spacing: -0.045em; }
.xr-hero h1 em { font-style: normal; color: transparent; background: linear-gradient(100deg, var(--signal) 10%, var(--signal-hot) 60%, #ffb199 100%); -webkit-background-clip: text; background-clip: text; }
.xr-hero .lede { color: var(--mute); font-size: clamp(17px, 1.6vw, 20px); max-width: 60ch; margin-bottom: 40px; }

.xr-form { width: 100%; max-width: 720px; }
.xr-input { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 22px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(14,17,22,0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 90px -40px var(--signal-glow); transition: border-color 0.2s, box-shadow 0.2s; }
.xr-input:focus-within { border-color: var(--signal); box-shadow: 0 0 0 5px rgba(255,52,8,0.14), 0 30px 90px -40px var(--signal-glow); }
.xr-proto { color: var(--dim); font-size: 15px; }
.xr-input input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font-family: var(--body); font-size: 18px; padding: 12px 4px; }
.xr-input input::placeholder { color: var(--dim); }
.xr-input .btn { flex: none; }
.xr-err { margin-top: 14px; color: var(--signal-hot); font-size: 15px; }
.xr-meta { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 24px; font-size: 12px; color: var(--mute); letter-spacing: 0.04em; }
.xr-meta .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: 1px; }
.xr-privacy { margin-top: 14px; font-size: 13.5px; color: var(--dim); max-width: 60ch; }
.xr-what { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 80px; width: 100%; text-align: left; }
.xr-what div { border: 1px solid var(--line); border-radius: 18px; padding: 26px; background: rgba(14,17,22,0.6); }
.xr-what b { color: var(--signal); font-weight: 400; font-size: 12px; }
.xr-what h3 { font-size: 20px; margin: 14px 0 8px; }
.xr-what p { color: var(--mute); font-size: 15px; }

/* ---------- scanning ---------- */
.xr-scan { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 60px;
  background: radial-gradient(ellipse 50% 60% at 30% 50%, rgba(255,52,8,0.12), transparent 70%), var(--void); }
.scan-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 70px; align-items: center; }
.phone-x { width: 280px; height: 570px; margin: 0 auto; border-radius: 44px; border: 1px solid var(--line-2); background: #050608; padding: 12px; position: relative;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.02), 0 50px 120px -40px var(--signal-glow); }
.phone-x::before { content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 80px; height: 22px; border-radius: 14px; background: #000; z-index: 3; }
.phone-screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: #0b0d11; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) invert(1) contrast(1.2) brightness(0.9); mix-blend-mode: screen; opacity: 0.85; }
.phone-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,52,8,0.18), rgba(255,52,8,0.04)); mix-blend-mode: color; pointer-events: none; }
.wf { position: absolute; inset: 0; padding: 50px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.wf i { display: block; border-radius: 6px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.06); }
.wf-nav { height: 18px; width: 60%; }
.wf-hero { height: 130px; background: linear-gradient(160deg, rgba(255,52,8,0.22), rgba(255,255,255,0.05)) !important; }
.wf-l { height: 10px; width: 92%; } .wf-l.s { width: 64%; }
.wf-btn { height: 28px; width: 46%; border-radius: 14px !important; background: rgba(255,52,8,0.35) !important; }
.wf-card { height: 70px; }
.beam { position: absolute; left: -10%; right: -10%; height: 90px; top: -90px; z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(255,52,8,0.10) 40%, rgba(255,107,61,0.55) 50%, rgba(255,52,8,0.10) 60%, transparent);
  box-shadow: 0 0 40px rgba(255,52,8,0.35); animation: beam 2.4s cubic-bezier(.45,.05,.55,.95) infinite; }
.beam::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: #ffb199; box-shadow: 0 0 12px #ff6b3d; }
@keyframes beam { 0% { top: -90px; } 100% { top: 100%; } }
.scan-log h2 { font-size: clamp(32px, 4vw, 52px); margin: 18px 0 34px; }
.scan-log .idx b { color: var(--signal); font-weight: 500; }
.steps-x { list-style: none; display: grid; gap: 4px; counter-reset: s; }
.steps-x li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 16.5px; transition: color 0.3s; }
.steps-x li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2); justify-self: center; transition: all 0.3s; }
.steps-x li::after { content: ""; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.steps-x li.run { color: var(--ink); }
.steps-x li.run::before { border-color: var(--signal); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.steps-x li.done { color: var(--mute); }
.steps-x li.done::before { background: var(--signal); border-color: var(--signal); box-shadow: 0 0 12px var(--signal-glow); }
.steps-x li.done::after { content: "done"; color: var(--ok); }
.scan-bar { margin-top: 30px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.scan-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--signal), var(--signal-hot)); box-shadow: 0 0 14px var(--signal); transition: width 0.6s ease; }

/* ---------- report ---------- */
.xr-report { padding: 130px 0 100px; background: radial-gradient(ellipse 60% 40% at 80% 0%, rgba(255,52,8,0.10), transparent 70%), var(--void); }
.rep-head { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 56px; align-items: center; margin-bottom: 56px; }
.rep-id .idx b { color: var(--signal); font-weight: 500; }
.rep-id h2 { font-size: clamp(36px, 5vw, 64px); margin: 16px 0 10px; }
.rep-domain { color: var(--signal-hot); font-size: 14px; text-decoration: none; }
.rep-domain:hover { text-decoration: underline; }
.rep-id p { color: var(--mute); font-size: 18.5px; margin-top: 20px; max-width: 58ch; }
.rep-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.rep-tags span { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; }
.xray-shot { margin: 0; }
.xs-frame { position: relative; aspect-ratio: 9 / 16; max-height: 460px; margin: 0 auto; border-radius: 26px; overflow: hidden; border: 1px solid rgba(255,52,8,0.4); background: #07090c;
  box-shadow: 0 0 0 6px rgba(255,52,8,0.05), 0 40px 120px -40px var(--signal-glow); }
.xs-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) invert(1) contrast(1.25) brightness(0.85); mix-blend-mode: screen; }
.xs-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color; background: linear-gradient(180deg, rgba(255,80,30,0.65), rgba(255,52,8,0.35)); }
.xs-wf { position: absolute; inset: 0; }
.xs-scan { position: absolute; left: 0; right: 0; height: 2px; top: 0; z-index: 3; background: #ffb199; box-shadow: 0 0 20px 4px rgba(255,107,61,0.6); animation: beam 4s ease-in-out infinite alternate; }
.xray-shot figcaption { text-align: center; margin-top: 12px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }

.rep-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.score { position: relative; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); padding: 30px; display: flex; align-items: center; gap: 22px; min-height: 160px; }
.gauge { width: 112px; height: 112px; transform: rotate(-90deg); flex: none; }
.g-bg { fill: none; stroke: var(--line); stroke-width: 8; }
.g-fg { fill: none; stroke: var(--signal); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.7,.2,1), stroke 0.3s; filter: drop-shadow(0 0 6px rgba(255,52,8,0.6)); }
.s-in { position: absolute; left: 30px; width: 112px; text-align: center; }
.s-in b, .big b { font-family: var(--display); font-weight: 600; font-size: 34px; letter-spacing: -0.03em; }
.s-in span { color: var(--dim); font-size: 13px; }
.big { flex: none; min-width: 112px; text-align: center; }
.big b { font-size: 64px; line-height: 1; color: var(--ink); }
.big span { font-family: var(--mono); color: var(--dim); font-size: 14px; margin-left: 4px; }
.score p { font-size: 17px; font-weight: 500; line-height: 1.3; }
.score small { display: block; font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 6px; }

.rep-block { margin-top: 70px; }
.rb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.rb-head .idx { font-size: 13px; }
.rb-head .idx b { color: var(--signal); font-weight: 500; margin-right: 6px; }
.rb-head p { color: var(--mute); max-width: 62ch; }

.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 22px; display: flex; flex-direction: column; gap: 10px; opacity: 0; transform: translateY(10px); transition: opacity 0.5s, transform 0.5s; }
.check.in { opacity: 1; transform: none; }
.check .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.check h4 { font-size: 16px; font-weight: 600; }
.pill { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; border: 1px solid; white-space: nowrap; }
.pill.pass { color: var(--ok); border-color: rgba(90,240,168,0.35); background: rgba(90,240,168,0.06); }
.pill.warn { color: #ffc46b; border-color: rgba(255,196,107,0.35); background: rgba(255,196,107,0.06); }
.pill.fail { color: var(--signal-hot); border-color: rgba(255,107,61,0.4); background: rgba(255,52,8,0.08); }
.check .val { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.check p { color: var(--mute); font-size: 14.5px; }

.opps { display: grid; gap: 14px; }
.opp { display: grid; grid-template-columns: 64px 1fr 220px; gap: 24px; align-items: start; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 26px 28px; opacity: 0; transform: translateY(10px); transition: opacity 0.5s, transform 0.5s, border-color 0.3s; }
.opp.in { opacity: 1; transform: none; }
.opp:hover { border-color: rgba(255,52,8,0.4); }
.opp .rank { font-family: var(--display); font-size: 38px; font-weight: 600; color: var(--signal); line-height: 1; }
.opp h4 { font-size: 20px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.opp p { color: var(--mute); font-size: 15.5px; }
.opp .build { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--ink); }
.opp .build::before { content: "how we would build it: "; color: var(--dim); }
.opp .side { display: grid; gap: 12px; }
.meter small { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.meter small b { color: var(--ink); font-weight: 500; }
.meter div { height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter div i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--signal), var(--signal-hot)); transition: width 1.2s cubic-bezier(.2,.7,.2,1) 0.2s; }
.meter.effort div i { background: linear-gradient(90deg, #5b606a, #8d929c); }
.hrs { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.hrs b { font-family: var(--display); font-size: 22px; color: var(--signal-hot); font-weight: 600; margin-right: 4px; }
.fine { margin-top: 16px; font-size: 13px; color: var(--dim); max-width: 80ch; }

.wins { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wins li { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 18px 50px; position: relative; background: rgba(14,17,22,0.6); color: var(--ink); font-size: 15.5px; }
.wins li::before { content: "\2713"; position: absolute; left: 18px; top: 17px; width: 20px; height: 20px; border-radius: 6px; background: rgba(255,52,8,0.12); color: var(--signal); font-size: 12px; display: grid; place-items: center; }

.rep-cta { margin-top: 80px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; border: 1px solid rgba(255,52,8,0.4); border-radius: 26px; padding: 44px;
  background: linear-gradient(160deg, rgba(255,52,8,0.12), var(--panel) 55%); }
.rep-cta h3 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 16px; }
.rep-cta p { color: var(--mute); font-size: 17px; margin-bottom: 28px; max-width: 52ch; }
.lead h4 { font-family: var(--display); font-size: 18px; font-weight: 600; }
.again { margin-top: 40px; text-align: center; color: var(--dim); font-size: 13px; }
.again .mono { margin-left: 12px; }

@media (max-width: 1000px) {
  .scan-grid, .rep-head, .rep-cta { grid-template-columns: 1fr; }
  .scan-device { order: 2; }
  .phone-x { width: 240px; height: 480px; }
  .xs-frame { max-height: 380px; max-width: 220px; }
  .checks { grid-template-columns: 1fr 1fr; }
  .opp { grid-template-columns: 48px 1fr; }
  .opp .side { grid-column: 2; }
  .rep-scores { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .xr-back { display: none; }
  .xr-hero { padding-top: 120px; }
  .xr-input { flex-wrap: wrap; border-radius: 22px; padding: 10px 10px 10px 18px; }
  .xr-input input { font-size: 17px; }
  .xr-input .btn { width: 100%; justify-content: center; }
  .xr-what, .checks, .wins { grid-template-columns: 1fr; }
  .opp { grid-template-columns: 1fr; padding: 22px; }
  .opp .side { grid-column: auto; }
  .rep-cta { padding: 24px; }
  .score { padding: 22px; }
  .s-in { left: 22px; }
}
@media print {
  body::after, .nav, footer, .rep-cta, .again, .xs-scan { display: none !important; }
  body, .xr-report { background: #fff !important; color: #111 !important; }
  .xr-report { padding: 0; }
  .score, .check, .opp, .wins li { background: #fff !important; border-color: #ddd !important; break-inside: avoid; }
  .rep-id p, .check p, .opp p, .rb-head p { color: #444 !important; }
  .opp .build, .check .val, .opp h4, .score p { color: #111 !important; }
}

/* the hours score is a range, so it gets its own size and sits above its label */
.score.range { flex-direction: column; align-items: flex-start; gap: 10px; justify-content: center; }
.score.range .big { min-width: 0; text-align: left; }
.score.range .big b { font-size: clamp(34px, 3.4vw, 46px); }
.s-in span { display: block; margin-top: -2px; font-family: var(--mono); font-size: 11px; }
.s-in { top: 50%; transform: translateY(-50%); }
