:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #161616;
  background: #f4f4f1;
}
* { box-sizing: border-box; }
body { margin: 0; }
.container { width: min(1560px, calc(100% - 40px)); margin: 48px auto 80px; }
header { max-width: 760px; margin-bottom: 28px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; font-weight: 800; margin-bottom: 8px; }
h1 { font-size: clamp(34px, 5vw, 62px); line-height: 1; margin: 0 0 16px; }
header p:last-child { font-size: 18px; line-height: 1.55; color: #555; }
.panel { display: grid; grid-template-columns: minmax(280px, 1fr) 180px auto; gap: 16px; align-items: end; background: white; padding: 22px; border: 1px solid #deded8; border-radius: 14px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
input, select, button { min-height: 46px; border-radius: 9px; border: 1px solid #cfcfc8; font: inherit; padding: 0 12px; }
button { background: #151515; color: white; border: 0; padding-inline: 22px; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
.status { margin: 18px 0; padding: 16px 18px; border-radius: 10px; background: white; border: 1px solid #deded8; }
.status.error { border-color: #d98c7d; background: #fff8f6; }
.summary { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; margin: 26px 0 18px; }
.summary-card { background: white; border: 1px solid #deded8; border-radius: 12px; padding: 16px; }
.summary-card strong { display: block; font-size: 28px; }
.summary-card span { font-size: 12px; color: #666; }
.ai-panel { display: grid; grid-template-columns: minmax(220px,1fr) 150px 220px auto; gap: 14px; align-items: end; background: white; border: 1px solid #deded8; border-radius: 12px; padding: 18px; margin-bottom: 12px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 10px; }
.toolbar input { flex: 1; }
.table-wrap { overflow: auto; background: white; border: 1px solid #deded8; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 1380px; }
th, td { padding: 12px 14px; border-bottom: 1px solid #ecece7; vertical-align: top; text-align: left; }
th { position: sticky; top: 0; background: #fafaf8; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td { font-size: 13px; }
.url { max-width: 330px; overflow-wrap: anywhere; }
.small { font-size: 12px; color: #6b6b6b; margin-top: 4px; }
.reason { opacity: .8; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; background: #efefe9; font-size: 12px; font-weight: 800; }
.badge.ok { background: #e7f4e9; }
.badge.no { background: #f8e7e3; }
.ai-result > strong { margin-left: 6px; }
.section-label { display: inline-block; margin: 7px 0; padding: 3px 6px; background: #f1f1ed; border-radius: 5px; font-size: 11px; font-weight: 700; }
@media (max-width: 900px) {
  .container { width: min(100% - 24px, 1560px); margin-top: 24px; }
  .panel, .ai-panel { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr 1fr; }
}
.generator-panel { margin: 24px 0; background: white; border: 1px solid #deded8; border-radius: 14px; padding: 22px; }
.generator-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 18px; }
.generator-head h2 { margin: 2px 0 0; font-size: 28px; }
.selection-info { font-weight: 800; font-size: 13px; }
.generator-settings { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(320px,1.5fr) 170px auto; gap: 12px; align-items: end; margin-bottom: 14px; }
.generator-settings .wide { min-width: 0; }
.secondary { background: #efefe9; color: #151515; border: 1px solid #d7d7d0; }
.category-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.category-chip { display: inline-flex; grid-auto-flow: column; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #deded8; border-radius: 999px; background: #fafaf8; cursor: pointer; }
.category-chip input { min-height: auto; width: 16px; height: 16px; padding: 0; }
.category-chip span { color: #777; font-weight: 600; }
.generator-list { border: 1px solid #e3e3dd; border-radius: 10px; max-height: 620px; overflow: auto; }
.generator-row { display: grid; grid-template-columns: 42px 46px minmax(130px,.65fr) minmax(180px,1fr) minmax(260px,1.5fr) 90px; gap: 10px; align-items: end; padding: 10px 12px; border-bottom: 1px solid #ededE8; }
.generator-row:last-child { border-bottom: 0; }
.generator-row label { font-size: 11px; }
.generator-row input[type="text"] { min-height: 38px; font-size: 12px; width: 100%; }
.select-box { align-self: center; }
.select-box input { width: 20px; height: 20px; min-height: auto; }
.priority-score { align-self: center; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #f0f0eb; font-weight: 900; font-size: 12px; }
.row-link { align-self: center; font-size: 11px; font-weight: 700; color: #333; }
.generator-actions { display: flex; gap: 10px; margin: 16px 0; }
.preview-label { margin-top: 12px; }
#llmsPreview { width: 100%; min-height: 420px; resize: vertical; border: 1px solid #cfcfc8; border-radius: 9px; padding: 14px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
@media (max-width: 1100px) {
  .generator-settings { grid-template-columns: 1fr 1fr; }
  .generator-row { grid-template-columns: 36px 42px 1fr 1fr; }
  .generator-row .desc-field { grid-column: 3 / -1; }
  .generator-row .row-link { grid-column: 3 / -1; }
}
@media (max-width: 700px) {
  .generator-head { display: block; }
  .selection-info { margin-top: 10px; }
  .generator-settings { grid-template-columns: 1fr; }
  .generator-row { grid-template-columns: 36px 42px 1fr; }
  .generator-row label:not(.select-box), .generator-row .desc-field, .generator-row .row-link { grid-column: 1 / -1; }
}
.history-panel { margin: 0 0 18px; background: white; border: 1px solid #deded8; border-radius: 14px; padding: 18px 20px; }
.history-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 12px; }
.history-head h2 { margin: 1px 0 0; font-size: 22px; }
.history-head .eyebrow { margin: 0 0 3px; }
.history-head button { min-height: 38px; padding-inline: 14px; }
.history-list { display: grid; gap: 8px; }
.history-row { display: grid; grid-template-columns: minmax(220px,1.5fr) 170px 120px minmax(170px,.8fr) minmax(150px,.7fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid #e7e7e1; border-radius: 9px; background: #fafaf8; }
.history-site { min-width: 0; }
.history-site strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-site .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-metric { font-size: 12px; line-height: 1.45; }
.history-metric strong { display: block; font-size: 13px; }
.history-open { min-height: 36px; padding-inline: 14px; }
@media (max-width: 1100px) {
  .history-row { grid-template-columns: 1fr 160px 120px auto; }
  .history-row .history-ai, .history-row .history-llms { grid-column: auto; }
}
@media (max-width: 760px) {
  .history-row { grid-template-columns: 1fr auto; }
  .history-row > *:not(.history-site):not(.history-open) { grid-column: 1 / -1; }
}
