/* Echoboard styles. The shared look (colours, type, app shell) is in jt.css. */

.jt-app.eb {
  max-width: 1080px;
  /* Let the page grid shrink this column, so wide code blocks scroll in their own box. */
  min-width: 0;
}

.eb-home {
  text-decoration: none;
}

.eb-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: var(--line) solid var(--ink);
}

.eb-tabs a {
  flex: 1 1 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

.eb-tabs a + a {
  border-left: var(--line-thin) solid var(--ink);
}

.eb-tabs a:hover {
  background: var(--stripe);
}

.eb-tabs a[aria-current='page'] {
  background: var(--accent);
}

.eb-status {
  margin: 0;
  padding: 10px 18px;
  border-bottom: var(--line) solid var(--ink);
  background: repeating-linear-gradient(45deg, var(--paper) 0 10px, var(--stripe) 10px 20px);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.eb-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px 32px;
  min-width: 0;
}

.eb-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.eb-h2 {
  padding-bottom: 8px;
  border-bottom: var(--line) solid var(--ink);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
}

.eb-h3 {
  margin-top: 8px;
  font: 700 15px/1.3 var(--font-mono);
  text-transform: uppercase;
}

.eb-lead {
  font-size: 18px;
  line-height: 1.45;
}

.eb-section p,
.eb-section li {
  line-height: 1.5;
}

.eb-code {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: var(--line-thin) solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 400 13px/1.5 var(--font-mono);
  white-space: pre;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--stripe);
  padding: 1px 4px;
}

.eb-steps,
.eb-rules {
  margin: 0;
  padding-left: 22px;
}

/* Stats */

.eb-intro {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.eb-intro__text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: var(--line) solid var(--ink);
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}

.eb-intro__text p {
  font-size: 19px;
  line-height: 1.4;
}

.eb-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: var(--line) solid var(--ink);
}

.eb-stat {
  padding: 12px 14px;
}

.eb-stat:nth-child(odd) {
  border-right: var(--line-thin) solid var(--ink);
}

.eb-stat:nth-child(-n + 2) {
  border-bottom: var(--line-thin) solid var(--ink);
}

.eb-stat__value {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.eb-stat__label {
  margin-top: 4px;
  font: 700 11px/1.2 var(--font-mono);
  text-transform: uppercase;
}

/* Activity */

.eb-activity {
  margin: 0;
  padding: 0;
  list-style: none;
  border: var(--line-thin) solid var(--ink);
}

.eb-activity li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 12px;
  font: 400 13px/1.4 var(--font-mono);
}

.eb-activity li + li {
  border-top: 2px solid var(--stripe);
}

.eb-empty {
  padding: 16px;
  border: var(--line-thin) dashed var(--ink);
  font: 400 14px/1.5 var(--font-mono);
}

/* Tasks */

.eb-chapter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eb-chapter__title {
  font: 700 14px/1.3 var(--font-mono);
  text-transform: uppercase;
}

.eb-task {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: start;
  padding: 12px 14px;
  border: var(--line-thin) solid var(--ink);
  text-decoration: none;
  color: inherit;
}

.eb-task:hover {
  box-shadow: var(--shadow-sm);
  transform: translate(-2px, -2px);
}

.eb-task--open {
  background: var(--paper);
}

.eb-task--upcoming {
  background: repeating-linear-gradient(45deg, var(--paper) 0 10px, var(--stripe) 10px 20px);
}

.eb-task__id {
  font: 700 14px/1.3 var(--font-mono);
}

.eb-task__q {
  font-size: 15px;
  line-height: 1.45;
}

.eb-task__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.eb-badge {
  display: inline-block;
  padding: 4px 7px;
  border: 2px solid var(--ink);
  font: 700 11px/1 var(--font-mono);
  text-transform: uppercase;
  white-space: nowrap;
}

.eb-badge--ink {
  background: var(--ink);
  color: var(--paper);
}

.eb-badge--accent {
  background: var(--accent);
}

/* Task page */

.eb-question {
  padding: 18px;
  border: var(--line) solid var(--ink);
  background: var(--accent);
  box-shadow: var(--shadow-sm);
  font-size: 18px;
  line-height: 1.5;
}

.eb-study {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: var(--line) solid var(--ink);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.eb-study__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.eb-study__title {
  font-size: 22px;
  font-weight: 700;
}

.eb-meta {
  font: 400 13px/1.5 var(--font-mono);
  overflow-wrap: anywhere;
}

.eb-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: var(--line-thin) solid var(--ink);
  min-width: 0;
}

.eb-block__label {
  font: 700 12px/1 var(--font-mono);
  text-transform: uppercase;
}

.eb-fields {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
}

.eb-fields dt {
  font: 700 12px/1.5 var(--font-mono);
  text-transform: uppercase;
}

.eb-fields dd {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.eb-numbers {
  width: 100%;
  border-collapse: collapse;
  font: 400 13px/1.4 var(--font-mono);
}

.eb-numbers th,
.eb-numbers td {
  padding: 5px 8px;
  border: 2px solid var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}

.eb-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eb-item {
  padding: 10px 12px;
  border: 2px solid var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.eb-item__by {
  display: block;
  margin-bottom: 4px;
  font: 700 12px/1.3 var(--font-mono);
  text-transform: uppercase;
  white-space: normal;
}

.eb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.eb-table th,
.eb-table td {
  padding: 8px 10px;
  border: 2px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

.eb-table th {
  font: 700 12px/1.2 var(--font-mono);
  text-transform: uppercase;
  background: var(--stripe);
}

.eb-scroll {
  overflow-x: auto;
}

.eb-foot {
  margin: 0;
  padding: 12px 18px;
  border-top: var(--line) solid var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .eb-intro {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .eb-task__meta {
    justify-content: flex-start;
  }

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

  .eb-activity li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}
