/* goodimages - one stylesheet, no build step, light and dark. */

:root {
  --bg: #f6f6f8;
  --card: #ffffff;
  --ink: #16171d;
  --muted: #6b6c7b;
  --line: #e2e2ea;
  --accent: #3b5bdb;
  --accent-ink: #ffffff;
  --good: #2f9e44;
  --warn: #e8590c;
  --bad: #c92a2a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 17, 29, 0.06), 0 8px 24px rgba(16, 17, 29, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12131a;
    --card: #1b1c26;
    --ink: #e8e8ef;
    --muted: #9a9ab0;
    --line: #2c2d3a;
    --accent: #748ffc;
    --accent-ink: #101119;
    --good: #51cf66;
    --warn: #ffa94d;
    --bad: #ff6b6b;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 64px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bar {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 0 20px;
}
.bar h1 { margin: 0; font-size: 24px; letter-spacing: -0.01em; }
.tagline { margin: 4px 0 0; color: var(--muted); }

main { max-width: 980px; margin: 0 auto; display: grid; gap: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card h2 {
  margin: 0 0 16px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
}

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.span2 { grid-column: span 2; }

label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }

input[type="url"],
input[type="password"],
input[type="number"],
input[type="search"],
select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

fieldset.modes {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 16px 0 0;
  padding: 12px 14px;
}
fieldset.modes legend { color: var(--muted); font-size: 13px; padding: 0 6px; }
.radio { display: flex; gap: 10px; align-items: start; padding: 6px 0; color: var(--ink); }
.radio input { margin-top: 3px; }
.radio small { display: block; color: var(--muted); font-size: 12.5px; }

.check { display: flex; flex-direction: row; align-items: center; gap: 8px; color: var(--muted); }
.check.standalone {
  align-items: flex-start;
  margin-top: 14px;
  color: var(--ink);
  font-size: 14px;
  flex-wrap: wrap;
}
.check.standalone input { margin-top: 3px; }
.check.standalone small { flex-basis: 100%; color: var(--muted); font-size: 12.5px; padding-left: 24px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

button {
  font: inherit;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button:disabled { opacity: 0.5; cursor: default; }

.status { margin: 12px 0 0; font-size: 13px; color: var(--muted); min-height: 1.2em; white-space: pre-line; }
.status.ok { color: var(--good); }
.status.warn { color: var(--warn); }
.status.error { color: var(--bad); }
.note { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }

details { margin-top: 16px; }
summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* weights */
fieldset.weights {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 18px 0 0;
  padding: 14px 16px 6px;
}
fieldset.weights legend { color: var(--muted); font-size: 13px; padding: 0 6px; }
.slider {
  display: grid;
  grid-template-columns: 1fr 160px 46px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}
.slider label { color: var(--ink); font-size: 14px; gap: 1px; }
.slider label small { color: var(--muted); font-size: 12px; }
.slider input[type="range"] { width: 100%; accent-color: var(--accent); }
.slider output { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; font-size: 13px; }
.slider.dropped output { color: var(--warn); }
@media (max-width: 560px) {
  .slider { grid-template-columns: 1fr 52px; }
  .slider label { grid-column: span 2; }
}

/* albums */
.albums { list-style: none; margin: 14px 0 0; padding: 0; max-height: 340px; overflow-y: auto; }
.albums li { border-top: 1px solid var(--line); }
.albums li:first-child { border-top: none; }
.albums button {
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 11px 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
}
.albums button:hover { background: var(--bg); }
.albums .meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.albums li[aria-selected="true"] button { background: var(--bg); box-shadow: inset 2px 0 0 var(--accent); }

/* progress */
.progress { height: 6px; background: var(--line); border-radius: 999px; margin-top: 16px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.2s ease; }

/* results */
.stats { color: var(--muted); font-size: 13px; margin: 0; }
.results {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.results figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.results img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.results figcaption { padding: 9px 11px; font-size: 12.5px; }
.results .score { font-size: 15px; font-weight: 600; }
.results .file { color: var(--muted); word-break: break-all; }
.results .sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

footer { max-width: 980px; margin: 28px auto 0; color: var(--muted); font-size: 12.5px; }
code { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
