/* Page-specific layout. Everything else comes from terminal-theme.css. */

/* The one paragraph that says what this is. */
.lede {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--terminal-fg);
  margin-bottom: 1.2rem;
  max-width: 62ch;
}

/* --- drop it in ----------------------------------------------------------- */

.dropzone {
  border: 1px dashed var(--window-border);
  border-radius: 6px;
  padding: 2.6rem 1.2rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.dragging {
  border-color: var(--ansi-green);
  background: rgba(34, 197, 94, 0.07);
}
.drop-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.2rem; }
.dropzone .hint { margin-bottom: 0.2rem; }
.dropzone .button-row { justify-content: center; margin-top: 1rem; }

/* --- working -------------------------------------------------------------- */

.status-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  padding: 1.6rem 0 0.2rem;
}
.spinner {
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid var(--window-border);
  border-top-color: var(--ansi-blue);
  border-radius: 50%;
  flex: 0 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- the answer ----------------------------------------------------------- */

.verdict { font-size: 1rem; font-weight: 600; margin: 0.4rem 0 0.6rem; line-height: 1.5; }
.verdict.bad { color: var(--ansi-yellow); }
.verdict.good { color: var(--ansi-green); }

/* The download happened off-screen, in the browser's own chrome; this is the
   part of it that stays put on the page. */
.notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ansi-green);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.9rem;
}
.notice::before { content: "\2193"; font-weight: 700; }

/* The same strip once a setting has been changed: what is on disk is no longer
   what is on screen, so it stops claiming the save is current. */
.notice.stale {
  color: var(--ansi-yellow);
  background: rgba(250, 204, 21, 0.08);
  border-color: rgba(250, 204, 21, 0.35);
}
.notice.stale::before { content: "!"; }

#done .button-row { margin-bottom: 0.7rem; }
#summary { margin-bottom: 1.2rem; }

/* The same notice, thrown up over the page for a few seconds so it is seen
   even when the result is scrolled past. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 1.5rem);
  max-width: min(92vw, 34rem);
  background: hsl(220, 25%, 12%);
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: var(--ansi-green);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.showing { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
  .spinner { animation: none; }
}

/* --- before / after ------------------------------------------------------- */

.preview { margin-bottom: 1.2rem; }
.preview .nav-tabs { margin-bottom: 0.6rem; }
.stage {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--window-border);
  border-radius: 6px;
}
.art { display: block; width: 100%; }
.art img { display: block; width: 100%; height: auto; }

/* --- the drawers under it ------------------------------------------------- */

.drawer {
  border: 1px solid var(--window-border);
  border-radius: 6px;
  background: var(--panel-bg);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.6rem;
}
.drawer > summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary::before {
  content: "+";
  color: var(--ansi-blue);
  font-weight: 700;
  width: 0.7rem;
}
.drawer[open] > summary::before { content: "\2212"; }
.drawer[open] > summary { margin-bottom: 0.7rem; }

.findings { list-style: none; margin: 0; padding: 0; }
.findings li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--window-border);
  font-size: 0.8rem;
  line-height: 1.5;
}
.findings li:last-child { border-bottom: none; }
.findings .dot { margin-top: 0.42rem; flex: 0 0 auto; }
#diagnosis { margin-bottom: 0.4rem; }

.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 1rem; }

/* On a phone the tagline in the title bar wraps to three lines and pushes the
   whole tool down for nothing; the page already says what this is. */
@media (max-width: 560px) {
  .window-stats { display: none; }
}

/* iOS zooms into any control under 16px and never zooms back out. */
@media (pointer: coarse) {
  input[type="number"], input[type="text"] { font-size: 16px; }
}
