/*
 * Feed Builder styling — layered on top of site.css rather than replacing it,
 * so the tool and the landing page share one type scale, one palette, and one
 * set of card treatments.
 */

.builder-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 1500px;
  margin: 0 auto 14px;
  padding: 0 24px;
}
.builder-head h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.builder-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.builder-controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.builder-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

select,
input[type="text"] {
  background: var(--ink-soft);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  min-width: 175px;
}

.lede {
  max-width: 1500px;
  margin: 0 auto 12px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.lede strong { color: var(--fg); }

.status {
  max-width: 1500px;
  margin: 0 auto 14px;
  padding: 0 24px;
  min-height: 20px;
  font-size: 13px;
}
.status.warn { color: var(--brass); }
.status.error { color: var(--neg); }

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(360px, 1fr) minmax(300px, 420px);
  gap: 16px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px 40px;
  align-items: start;
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.panel h3 {
  margin: 20px 0 4px;
  font-family: var(--font-body);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}
.panel h3:first-of-type { margin-top: 14px; }
.hint { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }

.group { display: flex; flex-direction: column; gap: 8px; }
.control {
  background: var(--ink-softer);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
}
.toggle input { accent-color: var(--seal); width: 15px; height: 15px; }
.slider { margin-top: 8px; }
.slider-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.slider input[type="range"] { width: 100%; accent-color: var(--seal); margin: 2px 0 0; }

.prefs { gap: 4px; }
.pref {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  background: var(--ink-softer);
  border-radius: 8px;
  font-size: 13px;
}
.pref-weight { font-family: var(--font-mono); font-size: 12px; }
.pref-weight.pos, .reason-value.pos { color: var(--pos); }
.pref-weight.neg, .reason-value.neg { color: var(--neg); }

.feed { display: flex; flex-direction: column; gap: 10px; }
.empty { color: var(--muted); font-size: 13px; }

.card {
  background: var(--ink-softer);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.card.sponsored { border-style: dashed; border-color: color-mix(in srgb, var(--brass) 60%, var(--line)); }
.card-head { display: flex; gap: 11px; align-items: flex-start; }
.rank { font-family: var(--font-mono); font-size: 12px; color: var(--muted); min-width: 20px; padding-top: 3px; }
.titles { flex: 1; min-width: 0; }
.titles h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--fg);
}
.meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.badge {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brass) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent);
  color: var(--brass);
  font-weight: 700;
  white-space: nowrap;
}
.badge.lane {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
  font-weight: 600;
}

.why { margin-top: 9px; }
.why summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.reasons { margin-top: 7px; display: flex; flex-direction: column; gap: 3px; }
.reason { display: flex; justify-content: space-between; font-size: 12px; font-family: var(--font-mono); }
.reason.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; font-weight: 700; }
.reason-label { color: var(--muted); }
.reason.total .reason-label, .reason.total .reason-value { color: var(--fg); }
.note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); font-style: italic; }

.hash-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.hash {
  flex: 1;
  background: var(--ink-softer);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.hash-row .btn { padding: 8px 14px; font-size: 13px; }
.json { max-height: 380px; margin: 0; }

.receipt { display: flex; flex-direction: column; gap: 3px; }
.receipt-row { display: flex; justify-content: space-between; font-size: 12.5px; font-family: var(--font-mono); }
.receipt-key { color: var(--muted); }

.capabilities { display: flex; flex-direction: column; gap: 9px; }
.cap-group h4 {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.cap-items { display: flex; flex-wrap: wrap; gap: 4px; }
.cap {
  background: var(--ink-softer);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--muted);
}
.cap.portable {
  border-color: color-mix(in srgb, var(--seal) 45%, transparent);
  color: var(--seal);
}
