/* Reputation Analyzer. Tokens from the design handoff tokens.css (v1, light).
   Screen styles live inline in app.js templates, copied from the approved
   .dc.html screens; this file holds the tokens and the shared classes those
   screens define in their own <style> blocks. */

:root {
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ink-900: #0B0D12;
  --blue-600: #0A5CFF;
  --blue-800: #0838B8;
  --blue-400: #4D8DFF;
  --blue-100: #C9DBFF;
  --blue-50: #EAF1FF;
  --white: #FFFFFF;
  --cloud-50: #F4F6F9;
  --hairline: #E4E7EC;
  --divider: #EEF0F3;
  --gray-300: #C5CBD4;
  --gray-500: #6A7280;
  --gray-600: #4A515C;
  --gray-700: #3A404B;
  --star: #F2A007;
  --positive: #087A55;
  --critical: #D92D20;
  --sample-bg: #FFF4DB; --sample-fg: #7A4B00;
  --hypo-bg: #EDE8FF; --hypo-fg: #4B2BB8;
  --focus-ring: 0 0 0 4px rgba(10,92,255,.16);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cloud-50); color: var(--ink-900); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--blue-600); }
a:hover { color: var(--blue-800); }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .6; }
img { max-width: 100%; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.h1 { text-wrap: balance; }
@media (min-width: 1100px) { .h1-one { white-space: nowrap; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Visible focus everywhere (handoff: focus ring + 1px blue border). */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 1px solid var(--blue-600); outline-offset: 2px; box-shadow: var(--focus-ring);
}

/* Desktop shared classes (Desktop03-06) */
.pgd .lbl { font-size: 14px; font-weight: 500; color: var(--gray-500); }
.pgd .kpi { border-radius: 24px; background: #FFFFFF; border: 1px solid var(--hairline); padding: 24px; box-shadow: 0 1px 2px rgba(11,13,18,.04), 0 8px 24px rgba(11,13,18,.04); }
.pgd .panel { border-radius: 24px; background: #FFFFFF; border: 1px solid var(--hairline); box-shadow: 0 1px 2px rgba(11,13,18,.04), 0 8px 24px rgba(11,13,18,.04); }
.pgd .panel-lg { border-radius: 28px; background: #FFFFFF; border: 1px solid var(--hairline); box-shadow: 0 1px 2px rgba(11,13,18,.04), 0 12px 32px rgba(11,13,18,.06); }
.pgd input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue-600); margin: 0; }
.pgd .num { display: flex; align-items: center; height: 60px; border-radius: 16px; border: 1px solid var(--hairline); background: #FFFFFF; padding: 0 16px; margin-top: 12px; }
.pgd .num input, .pgd .num select { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-family: var(--font-mono); font-size: 24px; font-weight: 500; color: var(--ink-900); }
.pgd .num select { font-family: var(--font-sans); font-size: 20px; }
.pgd .num:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(10,92,255,.14); }
.pgd input[type=range] { width: 100%; accent-color: var(--blue-600); height: 28px; margin: 0; }
.pgd .flbl { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.pgd .fld { display: block; width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--hairline); background: #FFFFFF; padding: 0 16px; font: inherit; font-size: 17px; color: var(--ink-900); outline: none; margin-top: 8px; }
.pgd .fld:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(10,92,255,.14); }

/* Mobile shared classes (Mobile03-06) */
.pgm .lbl { font-size: 13px; font-weight: 500; color: var(--gray-500); }
.pgm .num { display: flex; align-items: center; height: 54px; border-radius: 14px; border: 1px solid var(--hairline); background: #F7F8FA; padding: 0 14px; margin-top: 10px; }
.pgm .num input, .pgm .num select { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: var(--ink-900); }
.pgm .num select { font-family: var(--font-sans); font-size: 18px; }
.pgm .num:focus-within { border-color: var(--blue-600); background: #FFFFFF; box-shadow: 0 0 0 4px rgba(10,92,255,.14); }
.pgm input[type=range] { width: 100%; accent-color: var(--blue-600); height: 32px; margin: 0; }
.pgm .q { font-size: 16px; font-weight: 600; line-height: 1.35; display: block; color: var(--ink-900); }
.pgm .flbl { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.pgm .fld { display: block; width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--hairline); background: #FFFFFF; padding: 0 14px; font: inherit; font-size: 17px; color: var(--ink-900); outline: none; margin-top: 6px; }
.pgm .fld:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(10,92,255,.14); }
/* Email sheet sits outside .pgm/.pgd, so it carries its own field styles. */
.pg-sheet { font-family: var(--font-sans); color: var(--ink-900); }
.pg-sheet .flbl { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.pg-sheet .fld { display: block; width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--hairline); background: #FFFFFF; padding: 0 16px; font: inherit; font-size: 17px; color: var(--ink-900); outline: none; }
.pg-sheet .fld:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(10,92,255,.14); }
.pgm input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue-600); margin: 0; }

/* Mobile screens are full-width, not the 390px artboard. Room for the tab bar. */
.pgm { min-height: 100vh; min-height: 100dvh; background: var(--cloud-50); color: var(--ink-900); font-family: var(--font-sans); position: relative; }
.pgm.has-tabs { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); height: 64px; border-radius: 22px; background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(228,231,236,.9); box-shadow: 0 10px 30px rgba(11,13,18,.12); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 6px; z-index: 20; max-width: 520px; margin: 0 auto; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--gray-500); text-decoration: none; font-size: 11px; font-weight: 500; min-height: 44px; }
.tabbar a[aria-current="page"] { color: var(--blue-600); font-weight: 600; }

/* Mobile confirm sheet */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 32px 32px 0 0; background: #FFFFFF; box-shadow: 0 -12px 40px rgba(11,13,18,.16); padding: 10px 20px calc(28px + env(safe-area-inset-bottom)); z-index: 30; max-width: 640px; margin: 0 auto; }

/* Loading skeleton bars */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.skel { animation: pulse 1.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
select.fld { appearance: none; -webkit-appearance: none; padding-right: 44px; background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236A7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; }
select.fld:invalid { color: #6A7280; }
#lead-roleOther { margin-top: 10px; }

/* Leaderboard (replaces the dot chart, 2026-10-15) */
.lb { margin-top: 22px; }
.lb-row { display: grid; grid-template-columns: 36px minmax(0, 1.3fr) 150px minmax(0, 1.6fr); gap: 16px; align-items: center; padding: 14px; border-radius: 18px; }
.lb-row + .lb-row { margin-top: 4px; }
.lb-row.you { background: #EAF1FF; box-shadow: inset 0 0 0 1.5px #0A5CFF; }
.lb-rank { font-size: 15px; font-weight: 600; color: #6A7280; text-align: center; }
.lb-row.you .lb-rank { color: #0A5CFF; }
.lb-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-thumb { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: none; background: #E3E8EF; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #6A7280; font-size: 16px; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-name { font-size: 16px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lb-meta { font-size: 13px; color: #6A7280; margin-top: 2px; }
.lb-youtag { display: inline-block; font-size: 11px; font-weight: 700; color: #FFFFFF; background: #0A5CFF; border-radius: 6px; padding: 2px 6px; margin-right: 6px; vertical-align: 1px; }
.lb-stars { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.lb-s { color: #F5A524; letter-spacing: 1px; font-size: 14px; }
.lb-s .off { color: #D5DAE2; }
.lb-bar { display: flex; align-items: center; gap: 12px; }
.lb-track { position: relative; flex: 1; height: 14px; border-radius: 99px; background: #F0F2F5; }
.lb-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: #C9D1DC; min-width: 6px; }
.lb-row.you .lb-fill { background: #0A5CFF; }
.lb-avg { position: absolute; top: -10px; bottom: -10px; width: 0; border-left: 2px dashed #0B0D12; opacity: .55; }
.lb-count { width: 56px; text-align: right; font-size: 17px; font-weight: 600; }
.lb-none { font-size: 13px; color: #6A7280; }
.lb-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #3A404B; align-items: center; }
.lb-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lb-legend i.dash { width: 0; height: 12px; border-radius: 0; border-left: 2px dashed #0B0D12; opacity: .55; }
.lb-gap { margin-top: 20px; padding: 16px 18px; border-radius: 16px; background: #0B0D12; color: #FFFFFF; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lb-gap b { font-size: 28px; }
.lb-gap span { color: #C3C9D3; font-size: 15px; }
.pgm .lb-row { grid-template-columns: 26px minmax(0, 1fr); gap: 10px 12px; padding: 12px 10px; }
.pgm .lb-stars, .pgm .lb-bar { grid-column: 2; }
.pgm .lb-thumb { width: 40px; height: 40px; }
