:root {
  --ink: #292d2b;
  --muted: #6c736f;
  --faint: #909690;
  --page: #f1efe8;
  --paper: #faf9f5;
  --paper-deep: #e9e6dd;
  --line: #d7d3c8;
  --accent: #50685c;
  --accent-soft: #dce4de;
  --warning: #9b6544;
  --chart: #607a6d;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.lab-shell {
  width: min(1260px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 42px;
}

.topbar {
  height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  width: fit-content;
  font-family: var(--serif);
  font-size: 21px;
}

.nav-links {
  display: flex;
  gap: 32px;
  color: var(--muted);
  font-size: 13px;
}

.nav-links a:hover {
  color: var(--ink);
}

.system-pill {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(250, 249, 245, 0.55);
  font-size: 12px;
  text-transform: capitalize;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.signal-lost .status-dot {
  background: var(--warning);
}

.eyebrow,
.meta-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.section-block {
  padding: 62px 0 28px;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.section-heading h2,
.panel-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.update-time {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hero {
  min-height: 410px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: end;
  gap: 70px;
  padding: 78px 0 66px;
  border-bottom: 1px solid var(--line);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-meta {
  padding: 18px 0 5px 24px;
  border-left: 1px solid var(--line);
}

.hero-time {
  margin: 0;
  font-family: var(--mono);
  font-size: 29px;
  letter-spacing: -0.04em;
}

.hero-date {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.connection-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 30px;
  padding: 16px 18px;
  border: 1px solid #d8cfbc;
  border-radius: 4px;
  background: #f7f1e4;
  color: #675b49;
  font-size: 13px;
}

.connection-note strong {
  display: block;
  margin-bottom: 4px;
}

.connection-note code {
  color: #796a53;
  font-family: var(--mono);
  font-size: 11px;
}

.sensor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.sensor-card {
  min-width: 0;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(36, 40, 37, 0.025);
}

.sensor-card[data-device-class="humidity"] {
  --chart: #657b83;
}

.sensor-card[data-device-class="power"],
.sensor-card[data-device-class="energy"] {
  --chart: #8a704c;
}

.sensor-card[data-device-class="battery"] {
  --chart: #6f7853;
}

.card-topline,
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sensor-type,
.status-tag {
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.status-tag {
  color: var(--accent);
}

.sensor-card[data-state="stale"] .status-tag,
.sensor-card[data-state="unavailable"] .status-tag {
  color: var(--warning);
}

.sensor-reading {
  margin: 30px 0 16px;
  font-family: var(--serif);
  font-size: clamp(48px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.sensor-reading small {
  margin-left: 5px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0;
}

.sparkline {
  width: 100%;
  height: 64px;
  display: block;
  border-bottom: 1px solid var(--line);
}

.card-footer {
  padding-top: 18px;
}

.card-footer h3 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 600;
}

.card-footer p {
  margin: 0;
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 42px 0 70px;
}

.camera-panel,
.console-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.camera-panel {
  padding: 24px;
}

.camera-expanded {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.panel-heading {
  margin-bottom: 22px;
}

.panel-heading h2 {
  font-size: 28px;
}

.camera-feed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.camera-feed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.camera-placeholder p {
  margin: 18px 0 5px;
  color: var(--ink);
  font-size: 14px;
}

.camera-placeholder small {
  font-size: 12px;
}

.camera-icon {
  position: relative;
  width: 42px;
  height: 30px;
  border: 1px solid var(--muted);
  border-radius: 3px;
}

.camera-icon::before {
  position: absolute;
  top: 8px;
  left: 14px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  content: "";
}

.camera-time {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 3px 5px;
  color: #fff;
  background: rgba(20, 22, 20, 0.55);
  font-family: var(--mono);
  font-size: 9px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}
.barrel-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  gap: 26px 64px;
  padding: 62px 0;
  border-bottom: 1px solid var(--line);
}

.barrel-copy h2 {
  max-width: 500px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.barrel-copy > p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.65;
}

.barrel-copy .barrel-rule {
  margin-top: 28px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}

.barrel-calculator {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.8fr);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.barrel-calculator form {
  padding: 26px;
  border-right: 1px solid var(--line);
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.mode-switch legend {
  width: 100%;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 600;
}

.mode-switch label {
  color: var(--muted);
  font-size: 12px;
}

.barrel-fields {
  display: grid;
  gap: 15px;
  margin-bottom: 20px;
}

.barrel-fields[hidden] {
  display: none;
}

.barrel-fields label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}

.barrel-fields input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: 0;
  background: #fff;
}

.barrel-fields input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.barrel-result {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  background: var(--paper-deep);
}

.barrel-result > div + div {
  margin-top: 24px;
}

.barrel-result span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.barrel-result strong {
  display: block;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
}

.barrel-result > p {
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.barrel-result .barrel-error {
  color: var(--warning);
}

.barrel-error:empty {
  display: none;
}

.boss-benchmarks {
  grid-column: 1 / -1;
  margin-top: 18px;
}

.boss-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
}

.boss-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
}

.boss-heading > p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.boss-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.boss-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}

.boss-table-wrap th,
.boss-table-wrap td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.boss-table-wrap thead th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.boss-table-wrap th:first-child {
  text-align: left;
}

.boss-table-wrap tbody th {
  font-weight: 600;
}

.boss-table-wrap tbody small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-weight: 400;
}

.boss-table-wrap tbody tr:last-child th,
.boss-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.barrel-caveat {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .barrel-section {
    grid-template-columns: 1fr;
  }

  .boss-heading {
    display: block;
  }

  .boss-heading > p {
    margin-top: 12px;
  }
}

@media (max-width: 600px) {
  .barrel-calculator {
    grid-template-columns: 1fr;
  }

  .barrel-calculator form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
.flash {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 50%;
  max-width: min(560px, calc(100% - 30px));
  padding: 12px 16px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(35, 39, 36, 0.12);
  font-size: 13px;
}

.flash-alert {
  border-color: #bd9278;
  color: #74472d;
}

.account-shell,
.private-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
}

.account-shell {
  display: grid;
  place-items: center;
  padding: 60px 0;
}

.account-card {
  width: min(480px, 100%);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.back-link {
  display: block;
  margin-bottom: 48px;
  color: var(--muted);
  font-size: 12px;
}

.account-card h1,
.settings-copy h1,
.discord-heading h1,
.message-panel h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.account-intro,
.settings-copy > p,
.discord-heading > p {
  color: var(--muted);
  line-height: 1.65;
}

.stacked-form {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.message-form label {
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select,
.message-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: 0;
  background: #fff;
}

.field input,
.field select {
  height: 44px;
  padding: 0 12px;
}

.field input:focus,
.field select:focus,
.message-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.field small,
.message-form small {
  color: var(--muted);
  font-size: 11px;
}

.primary-button,
.secondary-button,
.button-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.secondary-button,
.button-link {
  color: var(--accent);
  background: transparent;
}

.text-button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.setup-note,
.plain-note,
.form-errors {
  margin-top: 28px;
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.setup-note code {
  color: var(--ink);
}

.private-panel {
  min-height: 420px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.private-panel h2 {
  max-width: 420px;
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
}

.private-panel > p:not(.eyebrow) {
  max-width: 500px;
  margin: 22px 0 28px;
  color: var(--muted);
  line-height: 1.65;
}

.site-footer form {
  display: inline;
}
.console-panel {
  display: flex;
  min-height: 420px;
  flex-direction: column;
}

.console-bar {
  display: flex;
  justify-content: space-between;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.console-screen {
  flex: 1;
  max-height: 270px;
  overflow: auto;
  padding: 24px 20px;
  color: #d6ddd8;
  background: #303632;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  scrollbar-color: #555d58 transparent;
}

.console-screen p {
  margin: 0 0 8px;
}

.console-screen strong,
.console-command {
  color: #f3f0e7;
}

.console-error {
  color: #e4a78a;
}

.console-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px 13px 19px;
  border-top: 1px solid #4f5752;
  background: #303632;
  color: #b9c7be;
  font-family: var(--mono);
}

.console-input input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #f3f0e7;
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
}

.console-input input::placeholder {
  color: #88918b;
}

.console-input button {
  padding: 8px 13px;
  border: 1px solid #77817a;
  border-radius: 3px;
  color: #f3f0e7;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.console-input button:hover {
  background: #414943;
}

.command-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 13px 18px 17px;
  background: #303632;
}

.command-chips button {
  padding: 6px 9px;
  border: 1px solid #555e58;
  border-radius: 3px;
  color: #bfc7c2;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}

.command-chips button:hover {
  color: #fff;
  border-color: #7e8981;
}
.private-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.private-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.private-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}

.private-header nav form {
  display: inline;
}

.settings-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(50px, 10vw, 130px);
  padding: 80px 0;
}

.settings-copy > p {
  max-width: 440px;
}

.settings-copy .permission-copy {
  margin: 24px 0;
  font-size: 13px;
}

.settings-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.discord-heading {
  max-width: 720px;
  padding: 72px 0 40px;
}

.channel-list {
  margin-bottom: 70px;
  border-top: 1px solid var(--line);
}

.channel-row {
  display: grid;
  grid-template-columns: 24px minmax(150px, 0.6fr) 1fr 24px;
  gap: 15px;
  align-items: center;
  min-height: 68px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.channel-row:hover {
  background: rgba(250, 249, 245, 0.65);
}

.channel-row > span,
.channel-row small {
  color: var(--muted);
}

.channel-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 42px;
  padding: 52px 0 80px;
}

.channel-sidebar {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.channel-sidebar a {
  overflow: hidden;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-sidebar a.active {
  color: var(--ink);
  background: var(--paper-deep);
}

.message-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.message-panel > header {
  padding: 26px;
  border-bottom: 1px solid var(--line);
}

.message-panel h1 {
  font-size: 38px;
}

.message-panel > header > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.message-list {
  max-height: 590px;
  overflow: auto;
  padding: 10px 26px;
}

.discord-message {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.message-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.message-meta time {
  color: var(--faint);
  font-size: 10px;
}

.discord-message > p {
  margin: 8px 0 0;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.muted-message,
.empty-state {
  color: var(--muted);
  font-style: italic;
}

.message-form {
  padding: 24px 26px;
  border-top: 1px solid var(--line);
}

.message-form > div {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin: 9px 0 6px;
}

.message-form textarea {
  min-height: 78px;
  padding: 11px;
  resize: vertical;
}

@media (max-width: 760px) {
  .settings-grid,
  .discord-layout {
    grid-template-columns: 1fr;
  }

  .channel-sidebar {
    display: none;
  }

  .private-header nav {
    gap: 12px;
  }

  .channel-row {
    grid-template-columns: 20px 1fr 20px;
  }

  .channel-row small {
    display: none;
  }
}
@media (max-width: 900px) {
  .lab-shell {
    padding: 0 24px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 66px;
  }

  .hero-meta {
    width: 240px;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .lab-shell {
    padding: 0 15px;
  }

  .topbar {
    height: 70px;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 48px;
  }

  .hero-copy h1 {
    font-size: 50px;
  }

  .lede {
    margin-top: 24px;
    font-size: 16px;
  }

  .connection-note {
    display: block;
  }

  .connection-note code {
    display: block;
    margin-top: 12px;
  }

  .section-block {
    padding-top: 50px;
  }

  .section-heading {
    display: block;
  }

  .update-time {
    margin-top: 14px;
  }

  .sensor-grid {
    grid-template-columns: 1fr;
  }

  .sensor-card,
  .camera-panel {
    padding: 19px;
  }

  .site-footer {
    display: block;
    line-height: 1.6;
  }

  .site-footer p + p {
    margin-top: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
/*


 */
