/* AI Productivity Estimator — product UI (Satoshi + JetBrains Mono) */
:root {
  --bg: #070a12;
  --bg-elevated: #0e1424;
  --bg-card: #111827;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-soft: #64748b;
  --accent: #6d8cff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(109, 140, 255, 0.12);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --font: "Satoshi", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 8% -8%, rgba(109, 140, 255, 0.2), transparent 55%),
    radial-gradient(800px 420px at 92% 0%, rgba(34, 211, 238, 0.1), transparent 50%),
    radial-gradient(700px 380px at 50% 110%, rgba(52, 211, 153, 0.08), transparent 45%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app {
  width: min(1140px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.75rem 0 4.5rem;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 40rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark .logo {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1020;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(109, 140, 255, 0.35);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-soft);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tagline {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
  font-weight: 400;
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #c9d5ff;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(109, 140, 255, 0.22);
  white-space: nowrap;
}

.evidence-brief {
  margin-bottom: 1.35rem;
  padding: 1.05rem 1.2rem 1.15rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.07), rgba(109, 140, 255, 0.05));
  border: 1px solid rgba(52, 211, 153, 0.16);
}

.evidence-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6ee7b7;
  margin-bottom: 0.35rem;
}

.evidence-brief strong {
  display: block;
  font-size: 0.98rem;
  color: #ecfdf5;
  margin-bottom: 0.55rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.evidence-brief ul {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  display: grid;
  gap: 0.3rem;
}

@media (min-width: 860px) {
  .evidence-brief ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1.4rem;
  }
}

/* Main panel */
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
}

@media (max-width: 900px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
}

.inputs,
.results {
  padding: 1.85rem 1.85rem 2.1rem;
}

.inputs {
  border-right: 1px solid var(--border);
}

@media (max-width: 900px) {
  .inputs {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.step-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.step {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.step.on {
  color: #0b1020;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.step-line {
  flex: 0 0 1.4rem;
  height: 1px;
  background: var(--border-strong);
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-sub {
  margin: 0 0 1.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.05rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 520px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #dbe3f0;
  letter-spacing: -0.01em;
}

.field .hint {
  font-size: 0.76rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.4;
}

.field input,
.field select {
  appearance: none;
  width: 100%;
  padding: 0.78rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input:hover,
.field select:hover {
  border-color: var(--border-strong);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(109, 140, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(109, 140, 255, 0.16);
  background: #10182c;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.3rem;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.range-row input[type="range"] {
  flex: 1;
  padding: 0;
  height: 0.35rem;
  accent-color: var(--accent);
  border: none;
  background: transparent;
  box-shadow: none;
}

.range-value {
  min-width: 3.4rem;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: #c9d5ff;
  font-weight: 600;
}

.live-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: #c9d5ff;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(109, 140, 255, 0.16);
}

/* Results */
.results {
  background: linear-gradient(165deg, rgba(109, 140, 255, 0.08), transparent 48%),
    var(--bg-elevated);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .hero-split {
    grid-template-columns: 1fr;
  }
}

.hero-metric {
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: calc(var(--radius) - 6px);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(109, 140, 255, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.hero-metric.hero-gain {
  background: linear-gradient(135deg, rgba(109, 140, 255, 0.16), rgba(34, 211, 238, 0.08));
  border-color: rgba(109, 140, 255, 0.22);
}

.hero-metric .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.hero-metric .value {
  font-size: clamp(1.7rem, 3.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: #ecfdf5;
  font-variant-numeric: tabular-nums;
}

.hero-metric.hero-gain .value {
  color: #e0e7ff;
}

.hero-metric .value.mono,
.mono {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero-metric .sub {
  margin-top: 0.45rem;
  color: #a7f3d0;
  font-size: 0.84rem;
  font-weight: 500;
}

.hero-metric.hero-gain .sub {
  color: #c7d2fe;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.metric-card {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.metric-card .label {
  font-size: 0.72rem;
  color: var(--text-soft);
  margin-bottom: 0.3rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.metric-card .value {
  font-size: 1rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.metric-card .value.mono {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
}

.rate-pill {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: #cbd5e1;
}

.pill strong {
  color: #e2e8f0;
  font-family: var(--mono);
  font-weight: 600;
}

.notes-block {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.5;
}

.notes-block strong {
  color: #dbe3f0;
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.task-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.task-row-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.task-label {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.82rem;
}

.task-meta {
  font-size: 0.75rem;
  color: #a5b4fc;
  white-space: nowrap;
}

.task-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin: 0.25rem 0 0.15rem;
}

.task-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
}

.task-sub {
  font-size: 0.72rem;
  color: var(--text-soft);
}

.sources {
  margin-top: auto;
}

.sources h3 {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-soft);
  font-weight: 700;
}

.sources ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 14rem;
  overflow: auto;
}

.sources li {
  padding: 0.72rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.sources li .src-name {
  color: #dbeafe;
  font-weight: 600;
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.8rem;
}

.error-banner {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.error-banner.visible {
  display: block;
}

/* Footer */
.site-footer {
  margin-top: 1.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer p {
  margin: 0;
  max-width: 48rem;
  line-height: 1.5;
}

.footer-meta {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

/* File protocol banner */
.serve-banner {
  display: none;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fde68a;
  font-size: 0.88rem;
}

.serve-banner.visible {
  display: block;
}

.serve-banner code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
