:root {
  --bg: #0b1020;
  --panel: #121932;
  --panel-soft: #18213f;
  --text: #e8ecf8;
  --muted: #aeb8d4;
  --line: #2a355d;
  --accent: #6ea8fe;
  --success: #63d297;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.9);
}

.site-header .container,
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav {
  display: flex;
  gap: 1rem;
}

.site-header .container {
  padding: 1rem 0;
}

.brand {
  font-weight: 700;
  color: var(--text);
}

main.container {
  padding: 2rem 0 3rem;
}

.hero,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stack > * + * {
  margin-top: 1rem;
}

label span,
h1, h2, h3, h4 {
  display: block;
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="number"],
input[type="file"],
button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  font: inherit;
}

input[type="text"],
input[type="number"],
input[type="file"] {
  background: var(--panel-soft);
  color: var(--text);
}

button {
  background: var(--accent);
  color: #08111f;
  font-weight: 700;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.8rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(99, 210, 151, 0.15);
  color: var(--success);
  border: 1px solid rgba(99, 210, 151, 0.4);
}

.muted {
  color: var(--muted);
}

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plain-list li + li {
  margin-top: 0.5rem;
}

.stats,
.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stats dt,
.meta dt {
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.chunk {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: var(--panel-soft);
}

.output-file,
.result-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: var(--panel-soft);
}

.alert {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
}

.alert-success {
  background: rgba(99, 210, 151, 0.15);
  border-color: rgba(99, 210, 151, 0.4);
}

.alert-error {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.35);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checkbox input[type="checkbox"] {
  width: auto;
}

.grid.two.compact {
  margin-bottom: 0;
  gap: 1rem;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.5rem 0 0;
}
