* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0f14;
  color: #e6edf3;
}

html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; min-height: 100vh; background: #0b0f14; }
button, input, textarea { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }

.container { position: relative; z-index: 1; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 80px; }
.page-doodles { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.doodle { position: absolute; display: block; opacity: .5; }
.doodle-ring { top: var(--ring-y, 74px); left: max(12px, calc(50% - 700px)); width: 74px; height: 74px; border: 3px solid #d2a8ff; border-radius: 46% 54% 48% 52%; transform: rotate(var(--ring-rotation, -13deg)); box-shadow: inset 0 0 0 5px #0b0f14, inset 0 0 0 7px rgba(210,168,255,.45); }
.doodle-star { top: var(--star-y, 205px); right: max(14px, calc(50% - 695px)); color: #e3b341; font-size: 3rem; transform: rotate(var(--star-rotation, 12deg)); text-shadow: 22px 25px 0 rgba(227,179,65,.3); }
.doodle-dots { right: max(12px, calc(50% - 700px)); bottom: var(--dots-bottom, 90px); width: 76px; height: 58px; background-image: radial-gradient(circle, #3fb950 2px, transparent 3px); background-size: 15px 15px; transform: rotate(var(--dots-rotation, 8deg)); }
.doodle-squiggle { position: absolute; bottom: var(--squiggle-bottom, 55px); left: max(10px, calc(50% - 710px)); width: 120px; fill: none; stroke: #58a6ff; stroke-width: 4; stroke-linecap: round; opacity: .42; transform: rotate(var(--squiggle-rotation, -8deg)); }
.hero::after { content: ""; display: block; width: var(--underline-width, 88px); height: 8px; margin-top: -28px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 9'%3E%3Cpath d='M2 6 C22 1 37 8 55 4 S75 3 88 5' fill='none' stroke='%2358a6ff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; transform: rotate(var(--underline-rotation, -2deg)); opacity: .75; }
.hero { width: 100%; max-width: 760px; min-width: 0; margin-bottom: 34px; }
.hero-logo { display: block; width: clamp(150px, 24vw, 210px); height: auto; margin: -20px 0 6px -14px; filter: drop-shadow(0 12px 28px rgba(20,70,220,.2)); }
.eyebrow { margin: 0 0 8px; color: #58a6ff; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 16px; font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1.02; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 1.35rem; letter-spacing: -.02em; }
h3 { margin-bottom: 0; }
.subtitle { max-width: 68ch; margin-bottom: 30px; color: #9da7b3; font-size: 1.03rem; line-height: 1.65; }
.product-pillars { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: -16px 0 28px; color: #8b949e; font-size: .78rem; font-weight: 700; }
.product-pillars span:not(:last-child)::after { content: " ✦"; margin-left: 10px; color: #58a6ff; }
.search-form { max-width: 680px; }
.search-form > label { display: block; margin-bottom: 8px; font-size: .88rem; font-weight: 700; }
.input-row { display: flex; gap: 10px; }
input[type="text"] { flex: 1; min-width: 0; padding: 13px 15px; border: 1px solid #30363d; border-radius: 8px; outline: none; background: #0d1117; color: #e6edf3; }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #58a6ff; outline-offset: 2px; }
button { padding: 11px 16px; border: 1px solid transparent; border-radius: 8px; background: #238636; color: #fff; font-weight: 750; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: wait; }
button.secondary { border-color: #30363d; background: #21262d; }
.button-link { display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; border: 1px solid transparent; border-radius: 8px; background: #238636; color: #fff; font-weight: 750; text-decoration: none; }
.button-link:hover { filter: brightness(1.08); }
.button-link.secondary { border-color: #30363d; background: #21262d; }
.github-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #3d444d; background: #f0f6fc; color: #0d1117; box-shadow: 0 5px 18px rgba(0,0,0,.18); }
.github-button:hover { background: #fff; filter: none; transform: translateY(-1px); }
.github-button svg { flex: none; width: 20px; height: 20px; }
.github-button.compact { padding: 9px 13px; font-size: .86rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; max-width: 680px; margin: 18px 0 14px; color: #6e7681; font-size: .78rem; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #21262d; }
.home-auth { max-width: 680px; }
.home-auth p { margin: 9px 0 0; color: #8b949e; font-size: .8rem; }
.home-signed-in-auth { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border: 1px solid #30363d; border-radius: 10px; background: #0d1117; }
.home-signed-in-auth p { margin: 0; color: #c9d1d9; }
.home-auth-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.home-signed-in-auth[hidden], #home-signed-out-auth[hidden] { display: none; }
.signed-in-auth { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.signed-in-auth p { margin: 0; color: #c9d1d9; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.signed-in-auth[hidden], .button-link[hidden], button[hidden] { display: none; }
.status { min-height: 24px; margin: 16px 0 0; color: #9da7b3; line-height: 1.5; }
.status.error { color: #ff7b72; }

.loading-screen { min-height: min(580px, 70vh); display: grid; place-content: center; justify-items: center; padding: 48px 20px; text-align: center; }
.loading-screen[hidden], .result-page[hidden], .hero[hidden] { display: none; }
.loading-screen h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 5vw, 2.6rem); }
.loading-screen > p:last-child { max-width: 520px; margin: 0; color: #8b949e; line-height: 1.6; }
.loading-orbit { position: relative; width: 74px; height: 74px; margin-bottom: 24px; border: 2px solid #30363d; border-radius: 50%; }
.loading-orbit::before, .loading-orbit::after, .loading-orbit span { content: ""; position: absolute; border-radius: 50%; }
.loading-orbit::before { inset: -2px; border: 3px solid transparent; border-top-color: #58a6ff; animation: orbit 1s linear infinite; }
.loading-orbit::after { width: 12px; height: 12px; top: 7px; right: 4px; background: #d2a8ff; box-shadow: 0 0 18px rgba(210,168,255,.7); }
.loading-orbit span { width: 8px; height: 8px; inset: 31px; background: #3fb950; box-shadow: 0 0 15px rgba(63,185,80,.65); }
@keyframes orbit { to { transform: rotate(360deg); } }

.result-page { width: 100%; }
.result-page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.result-brand { display: inline-flex; align-items: center; gap: 9px; color: #58a6ff; font-size: 1rem; font-weight: 850; letter-spacing: .06em; text-decoration: none; }
.result-logo-crop { position: relative; display: block; width: 44px; height: 44px; overflow: hidden; border-radius: 5px; background: #071438; box-shadow: 0 6px 18px rgba(20,70,220,.22); }
.result-logo-crop img { position: absolute; width: 60px; max-width: none; height: 60px; top: -5px; left: -8px; }
.result-auth { display: flex; justify-content: flex-end; }

.results { width: 100%; min-width: 0; overflow: hidden; border: 1px solid #30363d; border-radius: 14px; background: #11161d; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.profile-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; border-bottom: 1px solid #30363d; }
.profile-identity { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; padding: 2px; border: 2px solid #58a6ff; border-radius: 50%; background: #21262d; box-shadow: 0 0 22px rgba(88,166,255,.22); }
.profile-name { margin-bottom: 2px; font-weight: 800; }
.muted-link { color: #8b949e; font-size: .88rem; text-decoration: none; }
.muted-link:hover { color: #58a6ff; }
.profile-insight { margin: 5px 0 0; color: #b1bac4; font-size: .78rem; line-height: 1.4; }
.profile-actions { display: flex; flex: none; gap: 8px; }

.tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 18px; border-bottom: 1px solid #30363d; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 14px 12px 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #8b949e; font-size: .9rem; }
.tab:hover { color: #e6edf3; filter: none; }
.tab.is-active { border-bottom-color: #f0f6fc; color: #f0f6fc; }
.tab-panel { min-width: 0; padding: 28px 24px 34px; }
.tab-panel[hidden] { display: none; }

.score-layout { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(340px, 1.8fr); gap: 18px; }
.overall-score, .category-scores, .recommendation-card, .audit-card, .repository-card, .methodology, .empty-state { border: 1px solid #30363d; border-radius: 10px; background: #0d1117; }
.overall-score { display: flex; flex-direction: column; justify-content: center; padding: 28px; background: radial-gradient(circle at top right, rgba(88,166,255,.14), transparent 55%), #0d1117; }
.overall-score > p:first-child { margin-bottom: 4px; color: #9da7b3; font-weight: 700; }
.overall-score strong { display: block; margin-bottom: 12px; font-size: 3.3rem; line-height: 1; letter-spacing: -.05em; }
.overall-score small { margin-left: 5px; color: #8b949e; font-size: 1rem; letter-spacing: 0; }
.score-disclaimer { margin-bottom: 0; color: #8b949e; font-size: .78rem; line-height: 1.5; }
.category-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; padding: 24px; }
.category-score.is-open { grid-column: 1 / -1; }
.category-score-trigger { width: 100%; padding: 0; border: 0; border-radius: 5px; background: transparent; color: inherit; text-align: left; }
.category-score-trigger:hover { filter: none; }
.category-score-trigger:hover .category-score-heading, .category-score-trigger[aria-expanded="true"] .category-score-heading { color: #58a6ff; }
.category-score-trigger:focus-visible { outline-offset: 6px; }
.category-score-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: #b1bac4; font-size: .84rem; }
.category-score-heading::after { content: "+"; color: #58a6ff; font-weight: 850; }
.category-score-trigger[aria-expanded="true"] .category-score-heading::after { content: "−"; }
.category-score-heading strong { color: #e6edf3; }
.score-track { height: 6px; overflow: hidden; border-radius: 99px; background: #21262d; }
.score-track span { display: block; height: 100%; border-radius: inherit; background: #3fb950; }
.category-explanation { margin-top: 13px; padding: 12px 14px; border-left: 2px solid #58a6ff; background: #11161d; color: #b1bac4; font-size: .78rem; line-height: 1.5; }
.category-explanation[hidden] { display: none; }
.category-explanation p { margin-bottom: 7px; color: #e6edf3; }
.category-explanation ul { margin: 0; padding-left: 18px; }
.category-explanation li + li { margin-top: 3px; }

.section-block { margin-top: 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.summary-text { margin: 0; color: #8b949e; font-size: .88rem; text-align: right; }
.recommendation-list, .audit-list, .repository-list { display: grid; gap: 12px; }
.recommendation-card { padding: 18px 20px; }
.recommendation-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.recommendation-card p { margin-bottom: 8px; color: #b1bac4; line-height: 1.5; }
.recommendation-card p:last-child { margin-bottom: 0; }
.recommendation-action { color: #e6edf3 !important; }
.affected-repositories { color: #8b949e !important; font-size: .82rem; }
.severity { padding: 3px 7px; border-radius: 99px; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.severity-high { background: rgba(248,81,73,.15); color: #ff7b72; }
.severity-medium { background: rgba(210,153,34,.16); color: #e3b341; }
.severity-low { background: rgba(88,166,255,.14); color: #79c0ff; }
.methodology { margin-top: 20px; padding: 15px 18px; color: #9da7b3; }
.methodology summary { color: #c9d1d9; font-weight: 700; cursor: pointer; }
.methodology p { margin: 12px 0 0; line-height: 1.55; }

.rating-guide, .panel-help { margin: -5px 0 18px; color: #8b949e; font-size: .82rem; line-height: 1.5; }
.audit-card { padding: 20px; }
.audit-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.audit-card h3 a, .repository-card a { color: #58a6ff; text-decoration: none; }
.audit-card h3 a:hover, .repository-card a:hover { text-decoration: underline; }
.repo-meta-line { margin: 5px 0 0; color: #8b949e; font-size: .8rem; line-height: 1.5; }
.repo-score { flex: none; padding: 5px 9px; border: 1px solid currentColor; border-radius: 99px; font-size: .78rem; }
.score-strong { color: #56d364; }
.score-medium { color: #e3b341; }
.score-weak { color: #ff7b72; }
.current-description { margin: 16px 0; padding: 10px 12px; border-left: 3px solid #58a6ff; background: #161b22; color: #c9d1d9; line-height: 1.5; }
.fact-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.fact-row span { padding: 4px 8px; border: 1px solid #30363d; border-radius: 99px; color: #9da7b3; font-size: .72rem; }
.readme-checklist { margin: 0 0 18px; padding: 13px 14px; border: 1px solid #30363d; border-radius: 8px; background: #11161d; }
.readme-checklist > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.readme-checklist h4 { margin: 0; font-size: .82rem; }
.readme-checklist > div span { color: #8b949e; font-size: .72rem; font-weight: 750; }
.readme-checklist ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.readme-checklist li { padding: 4px 8px; border-radius: 99px; font-size: .72rem; }
.readme-checklist .is-detected { background: rgba(63,185,80,.12); color: #56d364; }
.readme-checklist .is-missing { background: rgba(210,153,34,.12); color: #e3b341; }
.finding-list { display: grid; gap: 8px; }
.finding { padding: 12px 14px; border-radius: 8px; background: #161b22; }
.finding > div { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.finding-type { padding: 2px 6px; border-radius: 4px; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.is-factual { background: rgba(88,166,255,.13); color: #79c0ff; }
.is-advisory { background: rgba(188,140,255,.13); color: #d2a8ff; }
.finding p { margin-bottom: 5px; color: #b1bac4; font-size: .86rem; line-height: 1.45; }
.finding p:last-child { margin-bottom: 0; }
.finding-action { color: #e6edf3 !important; }

.repository-card { display: flex; align-items: flex-start; gap: 14px; padding: 17px 18px; }
.repository-card > input { flex: none; margin-top: 4px; accent-color: #238636; }
.repository-card-content { min-width: 0; flex: 1; }
.repository-card-heading { display: flex; justify-content: space-between; gap: 14px; font-weight: 750; }
.repository-flags { color: #d29922; font-size: .75rem; font-weight: 700; }
.privacy-badge { display: inline-block; margin-right: 7px; padding: 3px 7px; border-radius: 99px; background: rgba(210,168,255,.13); color: #d2a8ff; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.candidate-label { margin: 12px 0 0; color: #79c0ff; font-size: .8rem; font-weight: 750; }
.repository-card p:not(.repo-meta-line) { margin: 7px 0 0; color: #b1bac4; line-height: 1.45; }

.export-heading { align-items: center; }
.actions { display: flex; gap: 8px; }
.export-options { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid #30363d; border-radius: 9px; }
.export-options legend { padding: 0 6px; color: #8b949e; font-size: .78rem; font-weight: 700; }
.export-options label { display: flex; align-items: center; gap: 7px; color: #c9d1d9; font-size: .85rem; }
.export-options input { accent-color: #238636; }
.export-options[hidden], .private-export-note[hidden] { display: none; }
.private-export-note { margin: -6px 0 18px; padding: 11px 13px; border-left: 3px solid #e3b341; background: rgba(210,153,34,.08); color: #c9b36b; font-size: .8rem; line-height: 1.5; }
textarea { width: 100%; min-height: 520px; resize: vertical; padding: 16px; border: 1px solid #30363d; border-radius: 9px; outline: none; background: #080b10; color: #e6edf3; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .84rem; line-height: 1.55; }
textarea:focus { border-color: #58a6ff; }
.empty-state { margin: 0; padding: 20px; color: #8b949e; line-height: 1.5; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 4px 0; color: #6e7681; font-size: .75rem; }
.footer strong { color: #8b949e; }

@media (max-width: 760px) {
  .container { width: min(100% - 24px, 1120px); padding: 30px 0 48px; }
  .hero { margin-bottom: 24px; }
  h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .input-row, .profile-bar, .section-heading, .audit-card-header, .export-heading { align-items: stretch; flex-direction: column; }
  .input-row button { width: 100%; }
  .profile-bar { gap: 14px; }
  .profile-actions { width: 100%; }
  .profile-actions button { flex: 1; }
  .signed-in-auth { align-items: stretch; flex-direction: column; }
  .home-signed-in-auth { align-items: stretch; flex-direction: column; }
  .home-signed-in-auth .github-button { width: 100%; }
  .home-auth-actions { width: 100%; }
  .home-auth-actions > * { flex: 1; }
  .auth-actions > * { flex: 1; }
  .result-page-header { align-items: flex-start; flex-direction: column; }
  .result-auth, .signed-in-auth, .auth-actions { width: 100%; }
  .tabs { padding: 0 10px; }
  .tab-panel { padding: 22px 16px 28px; }
  .score-layout { grid-template-columns: 1fr; }
  .category-scores { grid-template-columns: 1fr; }
  .summary-text { text-align: left; }
  .audit-card { padding: 16px; }
  .repo-score { align-self: flex-start; }
  .repository-card-heading { flex-direction: column; gap: 4px; }
  .actions { width: 100%; }
  .actions button { flex: 1; }
  .current-description, .repo-meta-line, .finding p, .repository-card p { overflow-wrap: anywhere; }
  .footer { flex-direction: column; gap: 5px; }
  .doodle-ring { left: -64px; }
  .doodle-star { right: -34px; font-size: 2rem; }
  .doodle-dots { right: -68px; }
  .doodle-squiggle { display: none; }
}

@media (min-width: 761px) and (max-width: 1399px) {
  .doodle-ring { left: -64px; }
  .doodle-star { right: -42px; }
  .doodle-dots { right: -68px; }
  .doodle-squiggle { left: -108px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .loading-orbit::before { animation: none; }
}
