/* bias.beauty /analysis. Builds on home.css tokens and components. */
[hidden] { display: none !important; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

/* hero */
@media (min-width: 921px) { .fa-hero .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.fa-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.fa-points li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--you-wash); color: var(--ink); }
.fa-points li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--you); }

.drop { position: relative; display: grid; place-items: center; min-height: 360px; border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 14px; background: var(--tile); cursor: pointer; overflow: hidden; transition: border-color .25s, background .25s, transform .25s var(--ease); }
.drop:hover, .drop.over { border-color: var(--you); background: color-mix(in srgb, var(--you-wash) 60%, var(--tile)); }
.drop.over { transform: scale(1.01); }
.drop.has-photo { border-style: solid; border-color: var(--line); background: #0c0c12; min-height: 0; }
.drop.busy { cursor: progress; }
.drop-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 32px 20px; color: var(--muted); font-size: 14px; }
.drop-empty svg { color: var(--you); margin-bottom: 6px; transition: transform .4s var(--ease); }
.drop:hover .drop-empty svg { transform: translateY(-4px) rotate(-4deg); }
.drop-empty b { color: var(--ink); font-size: 17px; }

.fa-photo { position: relative; display: block; width: min(100%, 416px); aspect-ratio: 4 / 5; margin: 0 auto; line-height: 0; background: #0c0c12; overflow: hidden; }
.fa-photo .pic { display: block; width: 100%; height: 100%; pointer-events: none; }
.fa-photo.develop .pic { animation: develop 1s var(--ease) both; }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 2px; opacity: 0; background: linear-gradient(90deg, transparent, var(--you), transparent); box-shadow: 0 0 18px 2px var(--you); pointer-events: none; }
.fa-photo.develop .scanline { animation: scan 1s var(--ease) both; }
.fa-photo.scanning .scanline { animation: sweep 1.6s ease-in-out infinite alternate; }
.fa-photo.scanning .pic image { filter: saturate(.55) brightness(.9); transition: filter .6s; }
@keyframes sweep { from { top: 2%; opacity: 1; } to { top: 98%; opacity: 1; } }

.overlay .lm circle { fill: #fff; opacity: .55; transform-box: fill-box; transform-origin: center; transition: opacity .35s var(--ease), transform .35s var(--ease); }
/* While one feature is shown, the other reference points step back. */
.overlay.focus .lm circle { opacity: .16; transform: scale(.5); }
.overlay.pop .lm circle { animation: lmpop .5s var(--ease) both calc(var(--i) * 7ms); transform-box: fill-box; transform-origin: center; }
@keyframes lmpop { from { opacity: 0; transform: scale(3); } 60% { opacity: .95; } }
.overlay .hl .seg { stroke: var(--you); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .6s var(--ease) forwards calc(var(--k) * 120ms); filter: drop-shadow(0 0 3px rgba(114, 21, 253, .8)); }
.overlay .hl .kp { fill: #fff; stroke: var(--you); stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: pop .4s var(--ease) both calc(var(--k) * 80ms); }
.overlay .hl .area { fill: var(--you); fill-opacity: .14; stroke: var(--you); stroke-width: 1.5; vector-effect: non-scaling-stroke; animation: fadein .5s var(--ease) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }

.fa-controls { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--tile); }
.seg-label { font-size: 13px; color: var(--muted); padding: 0 8px 0 10px; }
.seg button { appearance: none; border: 0; background: transparent; font: 600 14px var(--sans); color: var(--muted); padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(20, 20, 31, .12); }
.stage-foot.err { color: var(--bad, #d64545); }

/* result */
.fa-result { scroll-margin-top: 64px; }
.fa-board { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: start; }
@media (max-width: 920px) { .fa-board { grid-template-columns: 1fr; gap: 28px; } }
.fa-side { position: sticky; top: 84px; }
@media (max-width: 920px) { .fa-side { position: static; } }
.fa-photo-sm { width: min(100%, 48vh * .8, 400px); border-radius: 16px; }
.fa-photo-sm.no-def .overlay .lm circle { opacity: .25; }
.fa-detail { margin-top: 18px; min-height: 160px; max-height: calc(100vh - 84px - min(500px, 60vh) - 40px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 920px) { .fa-detail { max-height: none; overflow: visible; } }
.fa-detail h3 { font-size: 22px; margin: 2px 0 6px; }
.fa-detail p { font-size: 15px; color: var(--muted); margin-top: 10px; }
.fa-detail .d-read { color: var(--ink); margin-top: 0; }
.d-kicker { font-size: 13px; color: var(--you); font-weight: 600; }
.d-val { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.d-scale { display: grid; grid-template-columns: minmax(0, 1fr) 1.4fr minmax(0, 1fr); gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 14px; }
.d-scale span:last-child { text-align: right; }
.d-track { position: relative; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--line), var(--you-wash) 50%, var(--line)); }
.d-track::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1.5px; background: var(--muted); opacity: .5; }
.d-track i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--you); box-shadow: 0 0 0 4px var(--you-wash); animation: pop .5s var(--ease) both; }
.d-formula { font-size: 13px !important; padding: 10px 12px; border-radius: 10px; background: var(--tile); color: var(--ink) !important; }
.d-note { font-size: 13px !important; border-left: 3px solid var(--line); padding-left: 10px; }

.tops { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.top { appearance: none; width: 100%; display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 18px; align-items: center; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 20px; cursor: pointer; transition: border-color .25s, transform .3s var(--ease), box-shadow .3s; }
.top:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--you) 50%, var(--line)); }
.top.on { border-color: var(--you); box-shadow: 0 14px 34px -22px var(--you); }
.top-n { grid-row: 1 / 3; font: 700 34px/1 var(--display); white-space: nowrap; color: var(--you); font-variant-numeric: tabular-nums; }
.top-n small { font-size: 18px; margin-left: 2px; }
.top-t b { display: block; font: 700 19px/1.35 var(--display); }
.top-t span { font-size: 14px; color: var(--muted); }
.top-bar { position: relative; height: 4px; margin-top: 10px; border-radius: 4px; background: var(--line); }
.top-bar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1.5px; background: var(--muted); opacity: .5; }
.top-bar i { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--you); transition: left 1s cubic-bezier(.3, 1.3, .5, 1) calc(var(--i, 0) * 90ms + 200ms); }
.fa-result.in .top-bar i { left: var(--x); }
.js .fa-result .tops li { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease) calc(var(--i) * 90ms), transform .7s var(--ease) calc(var(--i) * 90ms); }
.js .fa-result.in .tops li { opacity: 1; transform: none; }
.tops li { --i: 0; }
.tops li .top-bar i { transition-delay: calc(var(--i) * 90ms + 300ms); }
@media (max-width: 640px) { .top { grid-template-columns: 76px minmax(0, 1fr); padding: 14px 16px; column-gap: 12px; } .top-n { font-size: 26px; } .top-t b { font-size: 17px; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0 0; }
.stats div { padding: 16px 0 0; border-top: 1.5px solid var(--ink); }
.stats b { display: block; font: 700 34px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stats span { font-size: 14px; color: var(--muted); }

.fa-style { margin-top: 48px; }
.fa-style h3, .fa-all h3 { font-size: 22px; }
.fa-style .muted { font-size: 14px; margin-top: 6px; }
.style-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 32px; margin-top: 18px; }
@media (max-width: 640px) { .style-bars { grid-template-columns: 1fr; } }
.sb { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 4.5em; gap: 12px; align-items: center; font-size: 14px; }
.sb .nm { font-weight: 600; }
.sb .sv { color: var(--muted); font-size: 13px; text-align: right; }
.sb .bar { margin: 0; }
.sb .bar i { transition-delay: calc(var(--i) * 60ms); }

.fa-all { margin-top: 48px; }
.fa-all-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { appearance: none; border: 1.5px solid var(--line); background: transparent; color: var(--muted); font: 600 14px var(--sans); padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.tabs button small { font-weight: 400; margin-left: 4px; opacity: .7; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.scale-legend { display: grid; grid-template-columns: 8em minmax(0, 1fr) 9.5em; gap: 16px; margin: 20px 0 4px; font-size: 12px; color: var(--muted); }
.scale-legend span:nth-child(1) { grid-column: 2; grid-row: 1; justify-self: start; }
.scale-legend span:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: center; }
.scale-legend span:nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { appearance: none; width: 100%; display: grid; grid-template-columns: 8em minmax(0, 1fr) 9.5em; gap: 16px; align-items: center; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 8px; cursor: pointer; border-radius: 0; transition: background .2s; }
.row:hover { background: var(--you-wash); }
.row.on { background: var(--you-wash); box-shadow: inset 3px 0 0 var(--you); }
.r-name { font-weight: 600; font-size: 15px; }
.r-track { position: relative; display: block; height: 4px; border-radius: 4px; background: var(--line); }
.r-track::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1.5px; background: var(--muted); opacity: .45; }
.r-dot { position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--you); box-shadow: 0 0 0 3px var(--surface); transition: left .9s cubic-bezier(.3, 1.3, .5, 1) calc(var(--i) * 40ms); }
.r-read { font-size: 14px; text-align: right; }
.r-read small { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rows.enter li { animation: enter .5s var(--ease) both calc(var(--i) * 35ms); }
@media (max-width: 640px) {
    .row, .scale-legend { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
    .r-line { grid-column: 1 / -1; grid-row: 2; }
    .scale-legend span { grid-column: 1 / -1 !important; }
}
.fa-result .honest { margin-top: 40px; }

.dl-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
    .js .fa-result .tops li { opacity: 1; transform: none; }
    .top-bar i { left: var(--x); }
}

/* Same-gender high-score reference interval; independent of legacy PRO mode. */
.r-celeb { position: absolute; top: 50%; transform: translateY(-50%); height: 9px; min-width: 2px; border: 1px solid #9570b6; border-radius: 4px; background: #b49acb70; box-sizing: border-box; z-index: 1; }
.r-dot, .d-track i, .r-track::before, .d-track::before { z-index: 2; }
.celeb-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.celeb-swatch { display: inline-block; width: 20px; height: 9px; border: 1px solid #9570b6; border-radius: 4px; background: #b49acb70; flex: 0 0 auto; }
.celeb-description { line-height: 1.7; }
