.ec {
  margin: 6px 0 18px;
}
.ec-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px 14px;
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  margin: 0;
}
.ec-f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ec-f > label,
.ec-f > span {
  font: 600 13.5px var(--sans);
  color: var(--muted);
}
.ec-f small {
  font-weight: 400;
}
.ec-in,
.ec-unit {
  font: 15px var(--sans);
  color: var(--text);
  background: var(--content);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 7px 9px;
  min-height: 40px;
  width: 100%;
  min-width: 0;
}
.ec-row {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.ec-row .ec-in {
  flex: 1 1 0;
  width: auto;
}
.ec-have {
  min-width: 0;
}
.ec-unit {
  flex: 0 0 auto;
  width: auto;
}
.ec-in:focus-visible,
.ec-unit:focus-visible,
.ec-chk input:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}
.ec-chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 14px var(--sans);
  color: var(--text);
  min-height: 40px;
  cursor: pointer;
}
.ec-chk input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
}
.ec-err {
  color: #c0392b;
  font-weight: 600;
  margin: 10px 0 0;
}
.ec-err[hidden] {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .ec-err {
    color: #ff8a7a;
  }
}
.ec-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0 6px;
}
.ec-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  min-width: 0;
}
.ec-tile b {
  display: block;
  font: 700 22px/1.25 var(--serif);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ec-tile span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.ec-note {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 12px;
  text-wrap: pretty;
}
.ec-det {
  margin: 6px 0 14px;
}
.ec-det summary,
.ec-blocks summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--link);
  padding: 2px 0;
}
.ec-long {
  max-height: 380px;
  overflow: auto;
  border: 1px solid var(--border);
}
.ec-table {
  border-collapse: collapse;
  background: var(--table);
  border: 1px solid var(--border);
  font-size: 14px;
  width: 100%;
  margin: 0;
}
.ec-table th,
.ec-table td {
  border: 1px solid var(--border);
  padding: 5px 10px;
  text-align: left;
}
.ec-table th {
  background: var(--th);
  font-weight: 600;
}
.ec-table td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ec-table tbody tr:hover td {
  background-image: linear-gradient(rgba(201, 154, 46, .10), rgba(201, 154, 46, .10));
}
.ec-long thead th,
.ec-long tfoot th {
  position: sticky;
  z-index: 1;
  background: var(--th);
}
.ec-long thead th {
  top: 0;
}
.ec-long tfoot th,
.ec-long tfoot td {
  position: sticky;
  bottom: 0;
  background: var(--th);
  font-weight: 700;
}
.ec-blocks details {
  border-bottom: 1px solid var(--soft);
  padding: 2px 0;
}
.ec-blocks .ec-table {
  margin: 4px 0 10px;
}
.ec-blocks .ec-table td:first-child {
  width: 5em;
}
@media (min-width: 640px) {
  .ec-have {
    grid-column: span 2;
  }
}
@media (max-width: 480px) {
  .ec-form {
    padding: 10px;
  }
  .ec-tile b {
    font-size: 19px;
  }
  .ec-table {
    font-size: 13px;
  }
  .ec-table th,
  .ec-table td {
    padding: 4px 6px;
  }
}
