/* AI Lens — self-contained styles.
   Mirrors eloquentix.com design system so this page works standalone
   AND when embedded in the site (where main.css is already loaded). */

@import url('https://fonts.googleapis.com/css2?family=Overpass:ital,wght@0,400;0,500;1,400;1,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;700&display=swap');

/* ── Base (mirrors theme.css + main.css) ─────────────────── */
:root {
  --color-background: #fff;
  --color-text: #000;
  --color-dark-grey: #444;
  --color-light-grey: #d9d9d9;
  --font-heading: "Overpass", "Helvetica", sans-serif;
  --font-text: "Source Code Pro", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #000;
    --color-text: #fff;
    --color-dark-grey: #d9d9d9;
    --color-light-grey: #444;
  }
}

html, body {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-text);
  margin: 0;
  padding: 3.75rem 3.125rem;
  scroll-behavior: smooth;
}

h1, h2 { font-family: var(--font-heading); font-weight: 600; }
h3 { font-family: var(--font-text); font-weight: 400; }

p {
  color: var(--color-dark-grey);
  line-height: 1.75rem;
}

a { color: var(--color-text); }
a:hover, a:focus, a:active { opacity: 0.65; }

address { font-style: normal; }

.link-home {
  display: block;
  margin: 0;
  text-decoration: none;
  user-select: none;
  width: fit-content;
}

#logo { width: 20rem; }

.delimiter {
  background-color: var(--color-light-grey);
  border-color: transparent;
  height: 0.125rem;
  margin: 2rem 0 3.25rem;
  min-width: 4.5rem;
  width: 20%;
}

footer {
  margin-top: 4rem;
}

.nav-links {
  display: flex;
  flex-direction: column;
  row-gap: 1.25rem;
}

.nav-link {
  display: block;
  padding: 4px;
  text-decoration: none;
  width: fit-content;
}

.nav-link:after { content: "->"; margin-left: 0.5rem; }

.contact-info { margin-top: 1rem; }

address .email {
  color: var(--color-text);
  display: block;
  padding: 4px;
  width: fit-content;
}

@media screen and (min-width: 780px) {
  body { max-width: 660px; margin: 0 auto; padding: 3.75rem 0; }
}

@media screen and (max-width: 480px) {
  #logo { width: 15rem; }
  body { padding: 2rem 1.5rem; }
}

/* ── Input ───────────────────────────────────────────────── */
#input-section { margin-top: 2rem; }

.input-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: baseline;
}

.repo-input {
  flex: 1;
  min-width: 200px;
  background: transparent;
  border: none;
  border-bottom: 0.125rem solid var(--color-light-grey);
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: 1rem;
  padding: 0.5rem 0;
  outline: none;
  transition: border-color 0.2s;
}

.repo-input::placeholder { color: var(--color-dark-grey); opacity: 0.6; }
.repo-input:focus { border-bottom-color: var(--color-text); }

#analyze-btn {
  background: transparent;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  font-family: var(--font-text);
  font-size: 1rem;
  padding: 0.5rem 0;
  white-space: nowrap;
  transition: opacity 0.2s;
}

#analyze-btn:hover { opacity: 0.65; }
#analyze-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.hint {
  color: var(--color-dark-grey);
  font-size: 0.8rem;
  margin-top: 0.5rem;
  line-height: 1.75rem;
}

/* ── Error ───────────────────────────────────────────────── */
.error-box {
  color: var(--color-text);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  display: none;
  opacity: 0.7;
}

.error-box::before { content: "! "; }

/* ── Debug ───────────────────────────────────────────────── */
#debug-panel { margin-top: 2rem; }

.debug-toggle {
  color: var(--color-dark-grey);
  cursor: pointer;
  font-size: 0.75rem;
  user-select: none;
}

.debug-toggle:hover { opacity: 0.65; }

.debug-log {
  margin-top: 0.5rem;
  font-family: var(--font-text);
  font-size: 0.75rem;
  color: var(--color-dark-grey);
  line-height: 1.6;
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Progress ────────────────────────────────────────────── */
#progress-area { margin-top: 2rem; }

.progress-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-dark-grey);
  padding: 0.2rem 0;
}

.spinner {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--color-light-grey);
  border-top-color: var(--color-text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.done-icon {
  font-size: 0.75rem;
  width: 14px;
  color: var(--color-dark-grey);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result ──────────────────────────────────────────────── */
#result-area { margin-top: 1rem; }

.result-content h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 1.5rem;
}

.result-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.25rem;
}

.result-content p {
  color: var(--color-dark-grey);
  line-height: 1.75rem;
  margin: 0.25rem 0;
}

.result-content strong { font-weight: 600; color: var(--color-text); }

.result-content hr {
  background-color: var(--color-light-grey);
  border-color: transparent;
  height: 0.125rem;
  margin: 1.5rem 0;
  min-width: 4.5rem;
  width: 20%;
}

.result-content code {
  font-family: var(--font-text);
  font-size: 0.88em;
  opacity: 0.7;
}

/* ── CTA ─────────────────────────────────────────────────── */
.cta-block { margin-top: 1rem; }
.cta-block p { margin-bottom: 1rem; }
.cta-block .email { text-decoration: none; }
.cta-block .email:after { content: " ->"; }
