:root{
  --bg: #fdf3f3;
  --panel: #ffffff;
  --panel-2: #fbeeee;
  --line: #f0d9d9;
  --accent: #cc1421;
  --accent-soft: #fbdde0;
  --accent-dim: #fdf1f2;
  --text: #241417;
  --muted: #7a6265;
  --muted-2: #a68d90;
  --good: #2e7d4f;
  --bad: #b3402f;
}


.section-box{
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}

.label{
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--muted);
}

.url-row{ display: flex; gap: 10px; flex-wrap: wrap; }
.url-row input[type=text]{
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-family: 'JetBrains Mono', monospace;
}
.url-row input[type=text]:focus{ outline: none; border-color: var(--accent); }

.app{
  padding: 11px 22px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ef5b5b);
  transition: filter .15s ease;
}
.app:hover{ filter: brightness(1.08); }
.app:disabled{ opacity: 0.5; cursor: not-allowed; }
.gray{ background: var(--line); color: var(--text); }

.empty-state{ text-align: center; color: var(--muted-2); padding: 26px 10px; font-size: 13.5px; }
.loading{ text-align: center; padding: 26px 10px; color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.error-state{ text-align: center; color: var(--bad); padding: 18px 10px; font-size: 13px; }

/* ANALYSIS LAYOUT */
.analysis-grid{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}
@media (max-width: 640px){ .analysis-grid{ grid-template-columns: 1fr; } }

.analysis-grid img{
  width: 100%;
  border-radius: 8px;
  display: block;
  background: var(--line);
}

.metric{ margin-bottom: 16px; }
.metric .mtitle{
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.metric .mtitle .mval{ font-family: 'JetBrains Mono', monospace; color: var(--accent); font-weight: 600; }
.meter{
  height: 8px;
  border-radius: 5px;
  background: var(--line);
  overflow: hidden;
}
.meter .fill{ height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), #ef5b5b); }
.metric .mnote{ font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.palette-row{ display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.swatch{
  width: 40px; height: 40px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  position: relative;
}
.swatch .hex-tip{
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  white-space: nowrap;
}

.summary-box{
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.summary-box b{ color: var(--accent); }

.note{
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
}
