:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-2: #ffffff;
  --ink: #000000;
  --ink-muted: #222222;
  --border: #000000;
  --accent: #0000ee;
  --accent-hover: #000000;
  --pass: #006600;
  --warn: #774400;
  --fail: #bb0000;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  --sans: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  background: #ffffff;
  color: #000000;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  max-width: 78ch;
  margin: 0 auto;
  padding: 20px 14px 64px;
}

a {
  color: #0000ee;
  text-decoration: underline;
}

a:visited {
  color: #551a8b;
}

h1, h2, h3, h4 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 22px 0 8px;
}

h1 {
  font-size: 1.15rem;
  margin-top: 0;
}

p, ul, ol, table, pre, form {
  margin: 0 0 14px;
}

hr {
  border: 0;
  border-top: 1px solid #000000;
  margin: 18px 0;
}

.site-header {
  border-bottom: 1px solid #000000;
  padding-bottom: 10px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.brand-title, .brand-title h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
  margin: 0;
  display: inline;
}

.brand-sub {
  color: #333333;
  font-size: 0.9rem;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.workspace, .panel, .code-viewer, .score-header, .data-table-wrap, .results-area, .split-checkout {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  max-width: 100% !important;
}

.panel[hidden] {
  display: none !important;
}

.data-table-wrap {
  overflow-x: auto;
}

table, .data-table, .lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 10px 0 18px;
}

th, td, .data-table th, .data-table td, .lb-table th, .lb-table td {
  text-align: left;
  padding: 6px 6px 6px 0;
  border-bottom: 1px solid #cccccc;
  vertical-align: top;
}

th, .data-table th, .lb-table th {
  border-bottom: 1px solid #000000;
  font-weight: 700;
  background: transparent;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #000000;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
  font-family: var(--mono);
  font-size: 0.9rem;
  margin-top: 2px;
}

button, .btn-primary, .btn-secondary, .preset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #000000;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

details {
  margin: 0 0 14px;
}

summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 480px) {
  html, body {
    font-size: 14px;
    padding: 16px 12px 48px;
  }
  th, td, .data-table th, .data-table td, .lb-table th, .lb-table td {
    padding: 6px 6px 6px 0;
    font-size: 0.8rem;
  }
}

.btn-primary {
  background: #000000;
  color: #ffffff;
}

.btn-primary:hover {
  background: #333333;
  color: #ffffff;
}

pre {
  border: 0 !important;
  border-left: 2px solid #000000 !important;
  background: #ffffff !important;
  padding: 6px 0 6px 12px !important;
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

.t-ok { color: var(--pass); font-weight: 700; }
.t-warn { color: var(--warn); font-weight: 600; }
.t-fail { color: var(--fail); font-weight: 600; }
.t-b { font-weight: 700; }
.t-s td { font-size: 0.82rem; padding: 6px 8px 6px 0; }
