:root {
  --echo-ink: #10233a;
  --echo-muted: #5b6b7d;
  --echo-line: #e3e8ee;
  --echo-accent: #1b6ca8;
  --echo-accent-soft: #e8f1f8;
  --echo-deep: #0b2239;
  --echo-gutter: clamp(1.25rem, 5vw, 3rem);
}

body {
  overflow-x: hidden;
}

body,
.navbar,
.card,
.form-label {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  color: var(--echo-ink);
  background: #f7f9fb;
}

/* ----------------------------------------------------------------- navbar */
.navbar {
  background: var(--echo-deep) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
}

.navbar .nav-link:hover {
  color: #fff !important;
}

.navbar .nav-link.active {
  color: #fff !important;
  box-shadow: inset 0 -2px 0 #6fb2e0;
}

.echo-brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.echo-brand-name {
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.16em;
  color: #fff;
}

.echo-brand-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
  .echo-brand-tagline {
    display: none;
  }
}

/* ------------------------------------------------------------------- home */
/* The home page breaks out of the bootstrap container so that the hero can
   span the full window while its contents stay on the same grid. */
.echo-home {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* Let the hero sit flush against the navbar. */
.tab-content > .tab-pane:has(> .echo-home) {
  margin-top: 0 !important;
}

.echo-body {
  max-width: calc(1240px + 2 * var(--echo-gutter));
  margin: 0 auto;
  padding: 0 var(--echo-gutter) 4rem;
}

.echo-hero {
  margin-bottom: 2.6rem;
  padding: 4rem var(--echo-gutter) 3.4rem;
  background:
    radial-gradient(1100px 420px at 12% -10%, rgba(111, 178, 224, 0.28), transparent 60%),
    radial-gradient(800px 400px at 88% 0%, rgba(88, 128, 196, 0.24), transparent 62%),
    linear-gradient(150deg, #0b2239 0%, #133453 55%, #14456b 100%);
  color: #fff;
}

.echo-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.echo-hero-title {
  font-size: 3.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.05;
}

.echo-hero-tagline {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a8cfeb;
}

.echo-hero-lead {
  margin-top: 1.3rem;
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.echo-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.8rem;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.echo-stat-value {
  font-size: 1.85rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.echo-stat-label {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.echo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.4rem;
}

.echo-card {
  background: #fff;
  border: 1px solid var(--echo-line);
  border-radius: 12px;
  padding: 1.5rem 1.6rem 1.7rem;
  box-shadow: 0 1px 2px rgba(16, 35, 58, 0.04);
}

.echo-card-title {
  font-size: 1.16rem;
  font-weight: 650;
}

.echo-card-meta {
  margin-top: 0.25rem;
  font-size: 0.86rem;
  color: var(--echo-muted);
  font-variant-numeric: tabular-nums;
}

.echo-comp-heading {
  margin: 1.35rem 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--echo-muted);
}

.echo-comp-item + .echo-comp-item {
  margin-top: 0.5rem;
}

.echo-comp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.86rem;
}

.echo-comp-name {
  color: var(--echo-ink);
}

.echo-comp-value {
  color: var(--echo-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.echo-comp-track {
  margin-top: 0.24rem;
  height: 4px;
  border-radius: 2px;
  background: var(--echo-accent-soft);
  overflow: hidden;
}

.echo-comp-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #2f7fb8, #6fb2e0);
}

.echo-section-title {
  margin: 2.6rem 0 1.1rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--echo-muted);
}

.echo-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}

.echo-feature {
  background: #fff;
  border: 1px solid var(--echo-line);
  border-left: 3px solid var(--echo-accent);
  border-radius: 10px;
  padding: 1.1rem 1.25rem 1.2rem;
}

.echo-feature-title {
  font-weight: 620;
  font-size: 0.98rem;
}

.echo-feature-body {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--echo-muted);
}

.echo-about {
  max-width: 1000px;
}

.echo-about .card-body p,
.echo-about .card-body li {
  line-height: 1.7;
}

/* ------------------------------------------------------------- app chrome */
.card {
  margin-bottom: 1rem;
  border-color: var(--echo-line);
}

.card-header {
  font-weight: 600;
  font-size: 0.95rem;
  background: #fbfcfd;
}

.sidebar .form-group,
.sidebar .shiny-input-container {
  margin-bottom: 0.9rem;
}

/* A little air between checkbox-group titles and the options. */
.sidebar .shiny-input-checkboxgroup > label {
  display: block;
  margin-bottom: 0.4rem;
}

.sidebar .checkbox label,
.sidebar .form-check-label {
  font-size: 0.88rem;
}

.shiny-data-frame {
  font-variant-numeric: tabular-nums;
}

/* Long cell type names should wrap in the dropdowns */
.selectize-dropdown-content .option {
  white-space: normal;
  line-height: 1.35;
}

.nav-tabs .nav-link {
  font-size: 0.92rem;
}

.btn-primary {
  background-color: var(--echo-accent);
  border-color: var(--echo-accent);
}

.btn-primary:hover {
  background-color: #155a8c;
  border-color: #155a8c;
}

/* Shiny radio/checkbox group titles use .control-label (not Bootstrap
   .form-label). Space the title from .shiny-options-group below it.
   See shiny.ui._utils.shiny_input_label and posit.co/py/docs/ui-customize. */
.echo-scoring-method .control-label {
  display: block;
  margin-bottom: 0.75rem !important;
}

.echo-scoring-method .shiny-options-group {
  margin-top: 0.35rem;
}
