:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #ffffff;
  --well: #f5f5f5;
  --border: #ddd;
  --text: #333;
  --muted: #333;
  --accent: #337ab7;
  --accent-dark: #23527c;
  --row-hover: #f5f5f5;
  --stripe: #f9f9f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

.page {
  width: min(1170px, calc(100% - 30px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

h1 {
  margin: 20px 0 10px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
}

h2 {
  margin: 20px 0 10px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
}

p {
  margin: 0 0 10px;
}

.intro {
  max-width: 960px;
}

.query-layout {
  display: grid;
  grid-template-columns: minmax(260px, 33.333333%) minmax(0, 66.666667%);
  gap: 15px;
  align-items: start;
}

.controls {
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  background: var(--well);
  box-shadow: inset 0 1px 1px rgb(0 0 0 / 5%);
}

.controls label,
.controls legend {
  font-weight: 600;
}

select {
  width: 100%;
  height: 34px;
  margin-top: 5px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
}

.help-text {
  margin: 10px 0;
  color: var(--muted);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 10px 0;
  font-weight: 400;
}

.choice input {
  margin-top: 4px;
}

.plot-wrap {
  min-width: 0;
  background: var(--surface);
}

.plot {
  width: 100%;
  min-height: 440px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}

th,
td {
  padding: 8px;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  border-bottom: 2px solid var(--border);
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: var(--stripe);
}

tbody tr:hover {
  background: var(--row-hover);
}

.ecl2-preview {
  position: relative;
  display: inline-block;
}

.ecl2-preview img {
  display: none;
  position: absolute;
  top: -22px;
  left: 80px;
  z-index: 5;
  width: min(50vw, 620px);
  border: 5px solid #555;
  background: var(--surface);
  box-shadow: 0 10px 28px rgb(31 41 51 / 22%);
}

.ecl2-preview:hover img,
.ecl2-preview:focus-within img {
  display: block;
}

.message {
  display: grid;
  min-height: 440px;
  place-items: center;
  color: #333;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 28px;
  text-align: center;
}

@media (max-width: 820px) {
  .query-layout {
    grid-template-columns: 1fr;
  }

  .plot,
  .message {
    min-height: 360px;
  }

  .ecl2-preview img {
    left: 0;
    top: 1.8em;
    width: min(82vw, 520px);
  }
}
