@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,500&display=swap");

:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-2: #eef3fa;
  --line: rgba(16, 34, 58, 0.12);
  --text: #10223a;
  --muted: #51667f;
  --quiet: #7a8798;
  --cyan: #1ed4e5;
  --green: #138a66;
  --amber: #b9770e;
  --red: #cc4b4b;
  --shadow: 0 14px 42px rgba(16, 34, 58, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(16,34,58,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,34,58,0.035) 1px, transparent 1px),
    radial-gradient(circle at 84% 8%, rgba(30, 212, 229, 0.14), transparent 24rem),
    var(--bg);
  background-size: 56px 56px, 56px 56px, auto, auto;
  color: var(--text);
}

a { color: inherit; }

main {
  width: min(1220px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}

.brand-orb {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(30, 212, 229, 0.4);
  background: linear-gradient(135deg, rgba(30, 212, 229, 0.18), rgba(255,255,255,0.9));
  color: #0d5b68;
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

nav a,
.ghost,
.ghost-link {
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 9px 12px;
  background: transparent;
  cursor: pointer;
}

nav a.active,
nav a:hover,
.ghost:hover,
.ghost-link:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(16,34,58,0.04);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  margin-bottom: 24px;
}

.page-head-note {
  min-width: 260px;
  max-width: 320px;
  align-self: stretch;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 212, 229, 0.1), rgba(255,255,255,0.92));
  padding: 18px;
  box-shadow: var(--shadow);
}

.page-head-note strong {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}

.page-head-note span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.eyebrow {
  display: block;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h1, h2 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
  margin: 0;
}

h1 {
  font-size: clamp(40px, 6vw, 74px);
  line-height: 0.95;
}

h2 {
  font-size: 26px;
}

p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 720px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(30, 212, 229, 0.5);
  background: var(--cyan);
  color: #04111e;
  font-weight: 800;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(30, 212, 229, 0.18);
}

button.danger {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.14);
  color: var(--red);
}

button.danger:hover {
  background: rgba(255, 107, 107, 0.2);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.panel,
.login-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.96)), var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
  margin-top: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head span {
  color: var(--quiet);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td small {
  display: block;
  color: var(--quiet);
  margin-top: 5px;
}

.row-link {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.status {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(16,34,58,0.03);
}

.status-queued { color: var(--amber); }
.status-scraping,
.status-analyzing { color: var(--cyan); }
.status-complete { color: var(--green); }
.status-failed { color: var(--red); }

.alert {
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin: 16px 0;
  background: rgba(255,255,255,0.7);
}

.alert.success {
  border-color: rgba(66, 211, 146, 0.4);
  color: var(--green);
}

.alert.error {
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.intake-panel {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(30, 212, 229, 0.24);
  background:
    linear-gradient(180deg, rgba(30, 212, 229, 0.08), rgba(255,255,255,0.84)),
    var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.intake-panel-light {
  border-radius: 2px;
}

.intake-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0 10px;
}

.intake-hero-copy h2 {
  font-family: Newsreader, Georgia, serif;
  font-size: 38px;
  font-weight: 500;
  margin: 0 0 8px;
}

.intake-hero-copy p {
  margin: 0;
  max-width: 760px;
}

.intake-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.url-field input {
  min-height: 58px;
  border-color: rgba(30, 212, 229, 0.36);
  background: rgba(255,255,255,0.98);
  font-size: 18px;
  font-weight: 700;
}

.launch-button {
  min-height: 58px;
  padding-inline: 24px;
}

.intake-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 0.75fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
}

.intake-required {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(30, 212, 229, 0.18);
  background: rgba(30, 212, 229, 0.06);
}

label small {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.intake-details {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.75);
}

.intake-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  padding: 15px 16px;
  color: var(--text);
  font-weight: 800;
}

.intake-details summary small {
  color: var(--quiet);
  font-weight: 600;
  text-align: right;
}

.compact-grid {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.compact-grid textarea {
  min-height: 82px;
}

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

.intake-cards div {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  padding: 14px;
}

.intake-cards strong {
  display: block;
  margin-bottom: 6px;
}

.intake-cards span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 12px;
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.wide,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions,
.action-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.action-strip {
  justify-content: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
}

.job-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(30, 212, 229, 0.32);
  background: rgba(30, 212, 229, 0.08);
}

.job-strip strong {
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.job-strip span {
  color: var(--text);
}

.job-strip em {
  color: var(--red);
  font-style: normal;
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(238,243,250,0.96));
  padding: 16px;
}

.metric span {
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
}

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

.control-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.control-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,245,251,0.95));
  padding: 16px;
  box-shadow: var(--shadow);
}

.control-card h3 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 8px;
}

.control-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.compact-stack {
  gap: 10px;
}

.danger-card {
  border-color: rgba(204, 75, 75, 0.28);
}

.artifact,
.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.artifact-primary {
  margin: 0 -12px;
  padding: 14px 12px;
  background: rgba(30, 212, 229, 0.08);
  border: 1px solid rgba(30, 212, 229, 0.28);
}

.mini-row small {
  display: block;
  color: var(--quiet);
  margin-top: 4px;
}

.score-line {
  display: grid;
  grid-template-columns: 90px minmax(120px, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.score-line span {
  color: var(--muted);
}

.score-track {
  height: 8px;
  background: rgba(16,34,58,0.08);
}

.score-track div {
  height: 100%;
  background: var(--cyan);
}

.artifact small {
  display: block;
  color: var(--quiet);
  margin-top: 4px;
}

.artifact a {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.empty {
  color: var(--quiet);
  padding: 18px 0;
}

.login-screen {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  padding: 30px;
}

.login-card h1 {
  font-size: 48px;
}

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

@media (max-width: 820px) {
  .topbar,
  .page-head,
  .two-col {
    display: block;
  }

  nav {
    margin: 14px 0;
  }

  .form-grid,
  .intake-primary,
  .intake-required,
  .intake-strip,
  .intake-cards,
  .metrics,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .intake-hero {
    display: grid;
  }

  .intake-details summary {
    display: grid;
  }

  .intake-details summary small {
    text-align: left;
  }
}
