:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #080a0a;
  --panel-2: #0d1011;
  --border: #273033;
  --border-strong: #455256;
  --muted: #9ba4a7;
  --text: #f2f4ed;
  --green: #bbff2a;
  --blue: #38dff1;
  --amber: #ffbe4d;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--green);
  outline: none;
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

.sheet-app {
  min-height: 100vh;
  padding: 0 10px 10px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  margin: 0 -10px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-strong);
  background: #000;
}

.brand {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.toolkit-menu {
  position: relative;
  z-index: 40;
}

.toolkit-menu summary {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  list-style: none;
  text-transform: uppercase;
}

.toolkit-menu summary::-webkit-details-marker {
  display: none;
}

.toolkit-menu nav {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: 286px;
  max-width: calc(100vw - 18px);
  padding: 7px;
  border: 1px solid var(--border-strong);
  background: #030404;
}

.toolkit-menu a {
  padding: 8px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.toolkit-menu a:hover,
.toolkit-menu a:focus-visible {
  background: #101515;
  color: var(--green);
  text-decoration: none;
}

.search-panel {
  display: grid;
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 0 14px;
  border-bottom: 1px solid var(--border);
}

.search-heading {
  display: grid;
  gap: 7px;
}

.search-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 5vw, 58px);
  letter-spacing: 0;
  line-height: 0.95;
  text-transform: uppercase;
}

.search-heading p,
.sheet-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.search-heading p {
  max-width: 780px;
  margin: 0;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.search-box {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--muted);
}

.search-box span {
  flex: 0 0 auto;
  padding-left: 10px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-box input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.search-form button {
  min-width: 112px;
  min-height: 48px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #061008;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-form button:hover,
.search-form button:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  outline: none;
}

.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 9px 0;
}

.sheet-meta div {
  min-height: 30px;
  padding: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.table-shell {
  position: relative;
  max-width: 1240px;
  height: calc(100vh - 242px);
  min-height: 420px;
  margin: 0 auto;
  overflow: auto;
  border: 1px solid var(--border-strong);
  background: #030404;
}

.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.data-table th,
.data-table td {
  max-width: 280px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid #171d1f;
  padding: 6px 8px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #111717;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.data-table td {
  color: #d8ded9;
}

.data-table tr:nth-child(even) td {
  background: #070909;
}

.data-table tr:hover td {
  background: #101716;
  color: var(--text);
}

.data-table td:nth-child(1),
.data-table th:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 48px;
  background: #0d1112;
  color: var(--muted);
}

.data-table th:nth-child(1) {
  z-index: 8;
  background: #151b1b;
}

.empty-state {
  padding: 20px;
  color: var(--amber);
  font-size: 12px;
}

.site-footer.site-legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 24px 0 38px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  text-align: center;
}

.site-footer.site-legal-footer a {
  color: inherit;
  font-size: inherit;
  font-weight: 750;
  text-decoration: none;
  text-transform: none;
}

.site-footer.site-legal-footer a:hover,
.site-footer.site-legal-footer a:focus-visible {
  color: var(--green);
  outline: none;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
  }

  .brand-copy strong {
    max-width: 190px;
  }

  .search-panel {
    padding-top: 18px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .search-form button {
    width: 100%;
  }

  .table-shell {
    height: calc(100vh - 318px);
    min-height: 360px;
  }

  .data-table {
    font-size: 10px;
  }
}
