:root {
  color-scheme: dark;
  --bg: #101b1d;
  --panel: #142225;
  --line: #2b3c3d;
  --text: #e6e8dd;
  --muted: #92aaa6;
  --mint: #acd6b2;
  --gold: #d7bd7c;
  --danger: #e9a390;
  --radius: 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 35% 0%, #1c3030 0, transparent 52%), var(--bg);
  color: var(--text);
  min-width: 320px;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 1px solid transparent;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
button:hover {
  background: #ffffff0a;
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.masthead {
  height: 93px;
  max-width: 1540px;
  margin: auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: Georgia, serif;
  font-size: 29px;
  letter-spacing: -1px;
}
.brand > svg {
  width: 33px;
  color: var(--mint);
}
.brand-sub {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 8px;
  letter-spacing: 2.8px;
  margin-top: 5px;
  color: var(--muted);
}
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.save-status {
  color: var(--muted);
  font-size: 11px;
  margin-right: 8px;
}
.save-status:before {
  content: "";
  display: inline-block;
  background: var(--mint);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin: 0 7px 2px 0;
}
.icon-button {
  height: 33px;
  width: 33px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
}
.quiet-button {
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
}
.quiet-button span {
  margin-left: 15px;
  color: var(--mint);
}
main {
  max-width: 1540px;
  padding: 0 48px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 38px 0 29px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--muted);
  font-weight: 600;
}
.page-heading .eyebrow {
  color: var(--gold);
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 43px;
  letter-spacing: -1.6px;
  margin: 10px 0 10px;
}
.page-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  letter-spacing: 0.1px;
}
.day-block {
  display: grid;
  grid-template-columns: 8px auto;
  gap: 8px;
  align-items: center;
  text-align: right;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--muted);
  padding-top: 10px;
}
.day-block strong {
  grid-column: 1/-1;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--text);
}
.live-dot,
.small-dot {
  width: 5px;
  height: 5px;
  background: var(--mint);
  border-radius: 50%;
  display: inline-block;
}
.live-dot {
  box-shadow: 0 0 10px #acd6b266;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 24px;
  align-items: start;
}
.tank-column {
  min-width: 0;
}
.tank-frame {
  border: 1px solid #405453;
  border-radius: var(--radius);
  overflow: hidden;
  background: #112d30;
  box-shadow: 0 16px 55px #0003;
}
.tank-top {
  height: 43px;
  background: #182c2edb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.tank-top > div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.tank-top #tank-volume {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.8px;
  border-left: 1px solid #ffffff21;
  margin-left: 2px;
  padding-left: 12px;
}
.canvas-wrap {
  height: clamp(360px, 33vw, 535px);
  position: relative;
  overflow: hidden;
}
.canvas-wrap > canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  cursor: crosshair;
}
.tank-watermark {
  position: absolute;
  bottom: 13px;
  left: 18px;
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #e0e8d85e;
  pointer-events: none;
}
.tank-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 46px;
  background: #14292b;
  padding: 0 16px;
  font-size: 10px;
  color: var(--muted);
}
.playback {
  display: flex;
  align-items: center;
  border: 1px solid #33494a;
  border-radius: 6px;
  overflow: hidden;
  padding: 3px;
  gap: 2px;
}
.playback button {
  font-size: 10px;
  min-width: 31px;
  height: 25px;
  border-radius: 3px;
  padding: 0 6px;
}
.playback button svg {
  width: 12px;
  height: 12px;
}
.playback .active {
  background: #adc9b41f;
  color: var(--mint);
}
.clock-note {
  font-size: 9px;
}
.water-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-top: 16px;
  background: #142225b3;
  padding: 18px 0;
}
.reading {
  padding: 0 15px;
  border-right: 1px solid var(--line);
}
.reading:last-child {
  border: 0;
}
.reading > span {
  display: block;
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--muted);
  white-space: nowrap;
}
.reading strong {
  font-size: 23px;
  letter-spacing: -0.8px;
  font-weight: 400;
  display: block;
  margin: 9px 0 10px;
  font-variant-numeric: tabular-nums;
}
.reading small {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 4px;
}
.mini-meter {
  height: 2px;
  background: #304343;
}
.mini-meter i {
  display: block;
  height: 100%;
  width: 50%;
  background: var(--mint);
  transition: width 1s;
}
.care-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 23px 0;
}
.care-title {
  display: flex;
  flex: 1;
  gap: 7px;
  flex-direction: column;
}
.care-title > span:last-child {
  font-size: 11px;
  color: var(--muted);
}
.care-button {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #3b5150;
  border-radius: 6px;
  padding: 11px 13px;
  font-size: 11px;
  background: #203335;
}
.care-button svg {
  width: 16px;
  color: var(--mint);
}
.care-button small {
  font-size: 8px;
  color: var(--muted);
}
.panel {
  background: #152326b3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.builder {
  overflow: hidden;
}
.builder-heading {
  padding: 24px 21px 20px;
}
.builder-heading .eyebrow {
  font-size: 8px;
  color: var(--gold);
}
h2 {
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  margin: 9px 0;
}
.builder-heading p {
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0 0;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 15px;
}
.tabs button {
  position: relative;
  width: 25%;
  font-size: 11px;
  padding: 13px 0;
  color: var(--muted);
}
.tabs button[aria-selected="true"] {
  color: var(--mint);
}
.tabs button[aria-selected="true"]:after {
  content: "";
  height: 2px;
  background: var(--mint);
  position: absolute;
  bottom: -1px;
  left: 10px;
  right: 10px;
}
#builder-content {
  padding: 17px 15px;
  min-height: 493px;
}
.catalog-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
  font-size: 9px;
  color: var(--muted);
}
.catalog-intro span:last-child {
  font-size: 8px;
  letter-spacing: 0.8px;
}
.species-card {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-bottom-color: #263b3c;
  border-radius: 6px;
  padding: 11px 6px;
  gap: 10px;
  position: relative;
}
.species-card:hover {
  background: #203535;
  border-color: #3b5852;
}
.species-card.selected {
  border-color: #93bda5;
  background: #243d36;
}
.species-icon {
  width: 65px;
  height: 40px;
  flex-shrink: 0;
}
.species-info {
  flex: 1;
  min-width: 0;
}
.species-info strong {
  font-weight: 400;
  font-size: 12px;
  display: block;
}
.species-info small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.species-info em {
  font-style: normal;
  font-size: 8px;
  color: var(--gold);
  display: block;
  margin-top: 5px;
}
.add-symbol {
  color: var(--mint);
  font-size: 18px;
}
.catalog-note {
  margin: 16px 6px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.catalog-note strong {
  color: var(--gold);
  font-weight: 400;
}
.builder-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 15px 17px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}
.builder-footer .small-dot {
  flex-shrink: 0;
}
.below-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
}
.below-grid .panel {
  padding: 20px;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.section-label h2 {
  font-size: 18px;
  margin: 0;
}
.badge {
  font-size: 7px;
  letter-spacing: 1px;
  background: #adc9b414;
  color: var(--mint);
  padding: 6px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.assessment-item {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 8px;
  padding-left: 13px;
  position: relative;
}
.assessment-item:before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
}
.assessment-item.warn:before {
  background: var(--gold);
}
.assessment-item.bad:before {
  background: var(--danger);
}
.assessment-item strong {
  display: block;
  color: var(--text);
  font-size: 10px;
  font-weight: 400;
}
.trend-heading {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 20px;
}
.legend-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 50%;
  margin: 0 3px 1px 7px;
}
.legend-dot.ammonia {
  background: var(--gold);
}
.legend-dot.nitrate {
  background: var(--mint);
}
#history {
  display: block;
  width: 100%;
  height: 70px;
  margin: 10px 0 5px;
}
.chart-foot {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  color: var(--muted);
}
.journal {
  max-height: 277px;
  overflow: auto;
  scrollbar-width: thin;
}
.journal-entry {
  display: grid;
  grid-template-columns: 39px 1fr;
  gap: 10px;
  position: relative;
  padding: 0 0 17px;
  font-size: 10px;
  line-height: 1.65;
}
.journal-entry time {
  font-size: 8px;
  color: var(--gold);
  padding-top: 1px;
}
.journal-entry p {
  margin: 0;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  padding: 32px 0 26px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #75918c;
  gap: 16px;
  line-height: 1.7;
}
.page-footer > span:last-child {
  letter-spacing: 0;
}
.page-footer button {
  text-decoration: underline;
  font-size: 8px;
  color: var(--muted);
  margin-left: 10px;
}
.placement-hint {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 10px 9px 15px;
  background: #142c2dea;
  border: 1px solid #719486;
  border-radius: 25px;
  color: #dae9ce;
  font-size: 11px;
  max-width: 95%;
  white-space: nowrap;
  box-shadow: 0 4px 20px #0003;
}
.placement-hint button {
  font-size: 17px;
  color: var(--muted);
  padding: 0 3px;
}
.inspection {
  position: absolute;
  bottom: 25px;
  right: 18px;
  width: 225px;
  padding: 17px;
  background: #142729ed;
  border: 1px solid #527369;
  border-radius: 8px;
  font-size: 11px;
  box-shadow: 0 10px 25px #0004;
}
.inspection h3 {
  margin: 0 0 5px;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
}
.inspection p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  margin: 7px 0;
}
.inspection button {
  font-size: 9px;
  color: var(--danger);
  border: 1px solid #73594d;
  border-radius: 4px;
  padding: 6px 8px;
}
.inspection .close-inspect {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 17px;
  border: 0;
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #e1e8d5;
  color: #1c3530;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 10px 40px #0007;
  z-index: 20;
  max-width: min(90vw, 560px);
  line-height: 1.5;
}
.setting {
  margin: 5px 5px 23px;
}
.setting label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 11px;
}
.setting output {
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
.setting input[type="range"] {
  width: 100%;
  accent-color: var(--mint);
  height: 5px;
  cursor: pointer;
}
.setting p,
.setting-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.setting select {
  width: 100%;
  background: #203334;
  border: 1px solid #3b5450;
  border-radius: 5px;
  padding: 10px;
  color: var(--text);
}
.substrates {
  display: flex;
  gap: 7px;
  margin: 12px 0 22px;
}
.substrates button {
  border: 1px solid var(--line);
  border-radius: 5px;
  flex: 1;
  padding: 13px 5px;
  font-size: 10px;
}
.substrates button.active {
  border-color: var(--mint);
  background: #314a3d;
}
.design-label {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 5px 0 12px;
}
.tool-row {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}
.tool-row button {
  font-size: 10px;
  border: 1px solid #3c514d;
  border-radius: 5px;
  padding: 10px;
  flex: 1;
}
.tool-row button.active {
  color: var(--gold);
  border-color: var(--gold);
}
dialog {
  background: #172c2d;
  color: var(--text);
  border: 1px solid #52685e;
  border-radius: 14px;
  padding: 35px;
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: 85vh;
  box-shadow: 0 20px 100px #0009;
}
dialog::backdrop {
  background: #071415b8;
  backdrop-filter: blur(5px);
}
.modal-close {
  position: absolute;
  right: 13px;
  top: 12px;
  font-size: 25px;
}
dialog h2 {
  font-size: 29px;
  margin-bottom: 20px;
}
dialog h3 {
  font-size: 12px;
  font-weight: 400;
  color: var(--gold);
  margin-top: 22px;
}
dialog p,
dialog li {
  font-size: 12px;
  line-height: 1.8;
  color: #adc1b7;
}
dialog .primary {
  background: var(--mint);
  color: #18332a;
  border-radius: 5px;
  padding: 12px 18px;
  margin-top: 16px;
  font-size: 12px;
}
dialog .secondary {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px 18px;
  margin-left: 10px;
  font-size: 12px;
}
.tank-frame:fullscreen {
  display: flex;
  flex-direction: column;
  border-radius: 0;
}
.tank-frame:fullscreen .canvas-wrap {
  height: auto;
  flex: 1;
}
.tank-frame:fullscreen .tank-top {
  height: 50px;
}
.tank-frame:fullscreen .tank-bottom {
  height: 55px;
}
@media (min-width: 1550px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .species-card {
    padding: 13px 9px;
  }
  .canvas-wrap {
    height: 510px;
  }
}
@media (max-width: 1150px) {
  main {
    padding: 0 28px;
  }
  .masthead {
    padding: 0 28px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 295px;
    gap: 18px;
  }
  .reading {
    padding: 0 9px;
  }
  .reading strong {
    font-size: 19px;
  }
  .reading > span {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .below-grid {
    grid-template-columns: 1fr;
  }
  .clock-note {
    display: none;
  }
  .builder-heading {
    padding: 21px 17px;
  }
  .care-button {
    padding: 10px;
    font-size: 10px;
  }
  .care-button small {
    display: none;
  }
}
@media (max-width: 850px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .builder {
    margin-top: 4px;
  }
  #builder-content {
    min-height: 0;
  }
  .species-card {
    width: calc(50% - 5px);
    display: inline-flex;
    vertical-align: top;
    margin-right: 5px;
  }
  .builder-heading {
    padding: 21px;
  }
  .builder-heading p {
    margin-top: 8px;
  }
  .tabs button {
    padding: 15px;
  }
  .catalog-intro {
    padding: 0 7px;
  }
  .catalog-note {
    max-width: 520px;
  }
  .below-grid {
    grid-template-columns: 1fr 1fr;
  }
  .canvas-wrap {
    height: clamp(350px, 58vw, 490px);
  }
  .page-heading {
    margin-top: 28px;
  }
  .water-strip {
    padding: 17px 0;
  }
  .reading {
    padding: 0 13px;
  }
  .reading strong {
    font-size: 23px;
  }
  .reading > span {
    font-size: 7px;
  }
  .setting {
    max-width: 600px;
  }
  .substrates {
    max-width: 600px;
  }
}
@media (max-width: 540px) {
  main {
    padding: 0 16px;
  }
  .masthead {
    padding: 0 16px;
    height: 76px;
  }
  .brand {
    font-size: 25px;
  }
  .brand-sub {
    font-size: 7px;
  }
  .brand > svg {
    width: 27px;
  }
  .header-actions {
    gap: 3px;
  }
  .save-status {
    display: none;
  }
  .quiet-button {
    font-size: 0;
    border: 0;
    padding: 7px;
  }
  .quiet-button span {
    font-size: 19px;
    margin: 0;
  }
  .page-heading {
    margin: 27px 0 23px;
  }
  h1 {
    font-size: 33px;
    letter-spacing: -1.3px;
  }
  .page-heading .eyebrow {
    font-size: 7px;
    letter-spacing: 1.4px;
  }
  .page-heading p {
    font-size: 10px;
    max-width: 210px;
    line-height: 1.6;
  }
  .day-block {
    font-size: 6px;
    letter-spacing: 0.7px;
    gap: 5px;
  }
  .day-block strong {
    font-size: 24px;
  }
  .canvas-wrap {
    height: 340px;
  }
  .tank-top {
    padding: 0 11px;
  }
  .tank-top > div {
    gap: 7px;
    font-size: 10px;
  }
  .tank-bottom {
    padding: 0 10px;
    font-size: 9px;
  }
  .water-strip {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 20px;
    padding: 17px 0;
  }
  .reading:nth-child(3) {
    border: 0;
  }
  .reading strong {
    font-size: 23px;
    margin: 7px 0;
  }
  .reading > span {
    font-size: 7px;
  }
  .care-row {
    flex-wrap: wrap;
    gap: 9px;
    margin: 20px 0;
  }
  .care-title {
    flex-basis: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
  }
  .care-title > span:last-child {
    font-size: 9px;
  }
  .care-title .eyebrow {
    font-size: 7px;
  }
  .care-button {
    flex: 1;
    justify-content: center;
    padding: 12px 8px;
  }
  .care-button small {
    display: inline;
  }
  .below-grid {
    grid-template-columns: 1fr;
  }
  .balance-panel #assessment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .balance-panel .assessment-item {
    margin: 0;
  }
  .journal {
    max-height: 170px;
  }
  .species-card {
    padding: 12px 5px;
    gap: 5px;
  }
  .species-icon {
    width: 44px;
  }
  .species-info strong {
    font-size: 10px;
  }
  .species-info small {
    font-size: 8px;
  }
  .species-info em {
    font-size: 7px;
  }
  .add-symbol {
    font-size: 14px;
  }
  .page-footer {
    flex-direction: column;
    gap: 6px;
    padding: 25px 0;
  }
  .placement-hint {
    font-size: 9px;
    gap: 5px;
    top: 12px;
  }
  .inspection {
    width: 195px;
  }
  .setting {
    margin-bottom: 27px;
  }
}
#assessment {
  max-height: 190px;
  overflow: auto;
  scrollbar-width: thin;
  padding-right: 5px;
}
@media (max-width: 540px) {
  .page-heading {
    gap: 12px;
  }
  .page-heading > div:first-child {
    min-width: 0;
  }
  h1 {
    font-size: 29px;
    line-height: 1.15;
  }
  .day-block {
    flex-shrink: 0;
  }
  .builder-heading p {
    font-size: 11px;
  }
}
