@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --bg: #f3efe8;
  --bg-grid: rgba(28, 32, 38, 0.06);
  --surface: #fbf8f4;
  --surface-strong: #ffffff;
  --surface-muted: #f0eae3;
  --surface-dark: #181b20;
  --surface-deep: #101216;
  --surface-panel: #22262d;
  --line: #d7cec4;
  --line-strong: #bcae9d;
  --line-dark: rgba(255, 255, 255, 0.12);
  --ink: #1d2025;
  --ink-soft: #4d4b49;
  --muted: #6a6966;
  --muted-strong: #333842;
  --fordham: #8b1e2d;
  --fordham-deep: #661421;
  --fordham-soft: rgba(139, 30, 45, 0.1);
  --accent-gold: #c4a86c;
  --good: #1f6a57;
  --good-soft: rgba(31, 106, 87, 0.12);
  --warn: #9e5a22;
  --warn-soft: rgba(158, 90, 34, 0.12);
  --shadow: 0 22px 48px rgba(33, 23, 18, 0.1);
  --shadow-strong: 0 32px 80px rgba(20, 13, 10, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.32)),
    linear-gradient(90deg, transparent 0, transparent 79px, var(--bg-grid) 80px, transparent 81px),
    linear-gradient(transparent 0, transparent 79px, var(--bg-grid) 80px, transparent 81px),
    linear-gradient(180deg, #f7f3ed 0%, #efe7dd 100%);
  background-size: auto, 80px 80px, 80px 80px, auto;
}

.shell {
  width: min(1320px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--fordham), var(--accent-gold), transparent 72%);
}

.hero {
  padding: 34px;
  background:
    linear-gradient(125deg, rgba(139, 30, 45, 0.18), transparent 38%),
    linear-gradient(180deg, #17181c 0%, #1f232b 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-strong);
  color: #f8f4ef;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 168, 108, 0.28), transparent 68%);
  pointer-events: none;
}

.hero-side {
  padding: 28px;
  display: grid;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(245, 239, 232, 0.96));
}

.brief-head h2,
.control-banner h2,
.section-head h2,
h3 {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  letter-spacing: -0.02em;
}

.eyebrow,
.hero-label,
.control-kicker,
.card-label,
.meta {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 228, 214, 0.78);
}

h1 {
  margin: 0 0 16px;
  max-width: 11ch;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.94;
}

.lede {
  max-width: 66ch;
  margin: 0;
  color: rgba(248, 244, 239, 0.82);
  font-size: 1.03rem;
  line-height: 1.7;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.hero-chip {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.hero-chip strong {
  display: block;
  line-height: 1.45;
  font-size: 0.98rem;
}

.hero-label {
  margin-bottom: 8px;
  color: rgba(236, 208, 168, 0.88);
}

.brief-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.brief-list {
  display: grid;
  gap: 12px;
}

.brief-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 240, 233, 0.92));
}

.brief-list span {
  color: var(--muted);
}

.brief-list strong {
  color: var(--fordham-deep);
}

.panel {
  margin-bottom: 18px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(246, 239, 232, 0.96));
}

.panel-primary {
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(248, 241, 235, 0.97));
}

.panel-secondary {
  background:
    linear-gradient(180deg, rgba(252, 248, 243, 0.98), rgba(245, 237, 229, 0.96));
}

.panel-evidence {
  background:
    linear-gradient(180deg, rgba(24, 27, 32, 0.99), rgba(33, 37, 44, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
  color: #f5f1eb;
}

.panel-evidence .section-head p,
.panel-evidence .meta,
.panel-evidence .card-label {
  color: rgba(240, 233, 225, 0.66);
}

.controls form,
.stack,
.query-results,
.progress-steps {
  display: grid;
  gap: 16px;
}

.control-banner,
.results-head,
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.control-banner {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.control-banner p,
.section-head p,
.results-head p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.58;
}

.grid {
  display: grid;
  gap: 16px;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 9px;
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfa;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus {
  outline: none;
  border-color: rgba(139, 30, 45, 0.48);
  box-shadow: 0 0 0 4px rgba(139, 30, 45, 0.1);
  background: #ffffff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--fordham), var(--fordham-deep));
  color: #fff8f5;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(102, 20, 33, 0.26);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

button:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.status {
  margin: 0;
  color: var(--muted);
}

.progress-panel {
  background:
    linear-gradient(180deg, rgba(252, 248, 243, 0.98), rgba(244, 236, 228, 0.96));
}

.progress-shell {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(29, 32, 37, 0.08);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--fordham), var(--accent-gold));
  transition: width 380ms ease;
}

.progress-meta {
  color: var(--muted);
  font-weight: 600;
}

.progress-step,
.card,
.item,
.query-card,
.trace-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
}

.progress-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 15px;
}

.progress-dot {
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border-radius: 50%;
  background: #c8bbb0;
}

.progress-step.active {
  border-color: rgba(139, 30, 45, 0.32);
  background: linear-gradient(180deg, rgba(139, 30, 45, 0.06), rgba(255, 255, 255, 0.98));
}

.progress-step.active .progress-dot {
  background: var(--fordham);
  box-shadow: 0 0 0 6px rgba(139, 30, 45, 0.12);
}

.progress-step.done .progress-dot {
  background: var(--accent-gold);
}

.results-top {
  margin-bottom: 18px;
}

.summary-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 241, 233, 0.96));
}

.card-label {
  color: var(--muted);
}

.card-value {
  margin-top: 8px;
  color: var(--ink);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
}

.result-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(139, 30, 45, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 30, 45, 0.08), rgba(196, 168, 108, 0.08));
}

.result-banner p {
  margin: 0;
  color: var(--muted);
}

.agent-badge,
.priority,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
}

.agent-badge {
  padding: 7px 12px;
  background: var(--surface-dark);
  color: #f8f3ee;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-badge.muted {
  background: #d8cdc3;
  color: var(--ink);
}

.item,
.query-card,
.trace-item {
  padding: 18px;
}

.priority {
  padding: 6px 10px;
  background: var(--fordham-soft);
  color: var(--fordham);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(188, 174, 157, 0.45);
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  background: #e8ddd1;
  color: var(--muted-strong);
  font-size: 0.77rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.45);
}

.panel-evidence .table-wrap,
.panel-evidence .item,
.panel-evidence .query-card,
.panel-evidence .trace-item {
  border-color: rgba(255, 255, 255, 0.1);
}

.query-results {
  gap: 18px;
}

.query-card {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(36, 40, 47, 0.98), rgba(26, 29, 34, 0.98));
  color: #f7f3ed;
}

.query-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.pill-row,
.citations,
.site-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  gap: 6px;
  padding: 6px 10px;
  background: #ece2d8;
  color: var(--muted-strong);
  text-decoration: none;
}

.panel-evidence .pill {
  background: rgba(255, 255, 255, 0.08);
  color: #f6f0e9;
}

.pill.good {
  background: var(--good-soft);
  color: var(--good);
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.panel-evidence .pill.good {
  color: #93d3bb;
}

.panel-evidence .pill.warn {
  color: #ebb176;
}

.answer {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  line-height: 1.62;
  white-space: pre-wrap;
}

.citation {
  flex: 1 1 240px;
  min-width: 240px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.panel-evidence .citation {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.citation a,
.item a {
  color: var(--fordham);
}

.panel-evidence .citation a,
.panel-evidence .item a {
  color: #efc8a4;
}

.source-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-metrics div {
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(139, 30, 45, 0.06);
}

.site-metrics strong {
  display: block;
  margin-top: 5px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.28rem;
}

.trace-list {
  display: grid;
  gap: 12px;
}

.trace-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.trace-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fordham-soft);
  color: var(--fordham);
  font-weight: 700;
}

.competitor-callout {
  background: linear-gradient(135deg, rgba(139, 30, 45, 0.08), rgba(196, 168, 108, 0.08));
}

.artifact-card .answer {
  max-height: 220px;
  overflow: auto;
}

.hidden {
  display: none;
}

@media (max-width: 1180px) {
  .hero-grid,
  .dashboard-grid,
  .source-grid,
  .summary-cards {
    grid-template-columns: 1fr;
  }

  .summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero-strip,
  .two-up {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 22px, 1320px);
    padding-top: 20px;
  }

  .hero,
  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  h1 {
    max-width: 14ch;
    font-size: clamp(2.35rem, 12vw, 4rem);
  }
}
