:root {
  --oa-blue: #173d92;
  --oa-blue-2: #235bd5;
  --oa-blue-3: #4b85ff;
  --oa-navy: #071a42;
  --ink: #0d1b3d;
  --muted: #5c6b89;
  --line: #d9e5ff;
  --soft: #eef5ff;
  --panel: #ffffff;
  --danger: #b42318;
  --success: #087443;
  --warning: #a15c00;
  --shadow: 0 22px 65px rgba(12, 43, 103, .14);
  --radius: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(68, 132, 255, .18), transparent 34rem),
    linear-gradient(180deg, #f7fbff 0%, #edf4ff 45%, #ffffff 100%);
}

a { color: inherit; }
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 8px 12px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(12,43,103,.08);
}
.brand-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; }
.brand strong { display: block; line-height: 1; color: var(--oa-blue); }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.topnav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.topnav a {
  text-decoration: none;
  color: var(--oa-blue);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 999px;
}
.topnav a:hover { background: #fff; box-shadow: 0 8px 24px rgba(12,43,103,.08); }

.panel {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 44px);
  margin: 28px 0;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 30px;
  align-items: center;
  min-height: 560px;
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -140px -220px auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(31,84,205,.18), transparent 70%);
  pointer-events: none;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  font-weight: 900;
  color: var(--oa-blue-2);
  margin: 0 0 8px;
}
h1, h2, h3 { color: var(--oa-navy); margin: 0; line-height: 1.05; }
h1 { font-size: clamp(42px, 7vw, 76px); letter-spacing: -.06em; max-width: 850px; }
h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; }
h3 { font-size: 22px; letter-spacing: -.02em; }
.lead { font-size: clamp(18px, 2vw, 23px); line-height: 1.55; color: var(--muted); max-width: 760px; }
.hero-actions, .result-actions, .log-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  appearance: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 900;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(12,43,103,.16); }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--oa-blue), var(--oa-blue-2)); }
.btn.secondary { color: #fff; background: var(--oa-blue-2); }
.btn.ghost { color: var(--oa-blue); background: #fff; border: 1px solid var(--line); }
.btn.danger { color: #fff; background: var(--danger); }
.btn.small { padding: 10px 13px; font-size: 13px; }
.notice {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #bcd1ff;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fbff, #edf4ff);
  color: #12306f;
  line-height: 1.5;
}
.notice.compact { max-width: 820px; }
.hero-card { position: relative; display: grid; justify-items: center; }
.penny { width: min(420px, 100%); filter: drop-shadow(0 30px 42px rgba(12,43,103,.2)); }
.speech {
  margin-top: -26px;
  max-width: 440px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(12,43,103,.12);
  line-height: 1.45;
}
.speech strong { color: var(--oa-blue); }

.section-heading { text-align: center; max-width: 800px; margin: 0 auto 28px; }
.section-heading.align-left { text-align: left; margin-left: 0; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 17px; line-height: 1.55; }
.search-form {
  background: linear-gradient(180deg, #fbfdff, #f1f6ff);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
}
.search-form label { display: block; color: var(--oa-navy); font-weight: 900; margin-bottom: 10px; }
.search-row { display: flex; gap: 10px; }
input, select {
  width: 100%;
  border: 1px solid #cbdaf7;
  background: #fff;
  color: var(--ink);
  padding: 14px 15px;
  border-radius: 16px;
  font-size: 16px;
  outline: none;
}
input:focus, select:focus { border-color: var(--oa-blue-3); box-shadow: 0 0 0 4px rgba(75,133,255,.16); }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.filters label { color: var(--muted); font-size: 14px; }
.helper { color: var(--muted); margin: 16px 0 0; }
.status {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--oa-blue);
  font-weight: 900;
}
.status.error { color: var(--danger); border-color: #ffd0cc; background: #fff5f4; }
.status.success { color: var(--success); border-color: #afe9cd; background: #f0fff8; }
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.result-card, .source-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(12,43,103,.08);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.result-topline { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.badge {
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--oa-blue-2);
  font-weight: 900;
}
.badge.warning { background: var(--warning); }
.badge.success { background: var(--success); }
.badge.danger { background: var(--danger); }
.small { color: var(--muted); font-size: 13px; }
.creator { font-weight: 800; color: var(--oa-blue); margin: 0; }
.description { color: var(--muted); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.audio-player { width: 100%; }
.result-meta { color: var(--muted); font-size: 13px; line-height: 1.45; }

.source-search { display: flex; gap: 12px; margin-bottom: 18px; }
.source-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px; }
.source-card p { color: var(--muted); line-height: 1.5; margin: 0; flex: 1; }
.source-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.source-tags span { background: var(--soft); color: var(--oa-blue); font-weight: 900; border-radius: 999px; padding: 7px 9px; font-size: 12px; }

.split-panel { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 26px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
}
.checklist input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; }
.checklist label { font-weight: 800; line-height: 1.4; }
.licence-helper {
  background: var(--oa-navy);
  color: #dbe7ff;
  border-radius: 24px;
  padding: 24px;
}
.licence-helper h3 { color: #fff; }
.licence-helper dt { font-weight: 900; color: #fff; margin-top: 16px; }
.licence-helper dd { margin: 6px 0 0; color: #dbe7ff; line-height: 1.45; }

.log-form { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)) auto; gap: 10px; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; margin-top: 18px; }
.log-table { width: 100%; border-collapse: collapse; min-width: 800px; background: #fff; }
.log-table th, .log-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.log-table th { color: var(--oa-blue); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; background: #f8fbff; }
.log-table tr:last-child td { border-bottom: 0; }
.log-table a { color: var(--oa-blue); font-weight: 800; }
.footer { color: var(--muted); text-align: center; padding: 28px 0 48px; }
.footer strong { color: var(--oa-blue); display: block; }

@media (max-width: 1000px) {
  .hero, .split-panel { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .source-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .log-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 20px, 1160px); }
  .topbar { position: static; align-items: flex-start; flex-direction: column; }
  .topnav { justify-content: flex-start; }
  .hero { min-height: auto; }
  .search-row, .source-search, .filters { grid-template-columns: 1fr; flex-direction: column; display: flex; }
  .results-grid, .source-grid, .log-form { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .result-actions .btn, .topnav a { width: auto; }
  h1 { font-size: 42px; }
}
