@import url("/site-tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--gutter);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.shell-header__brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}

.shell-header__brand:hover {
  text-decoration: none;
}

.shell-header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.shell-header__nav a {
  color: #6a6a66;
  text-decoration: none;
}

.shell-header__nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.shell-header__nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.shell-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--gutter);
}

.shell-main--narrow {
  max-width: 32rem;
}

.shell-main--wide {
  max-width: 56rem;
}

.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel h2,
.panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.8125rem;
}

.err {
  color: var(--danger);
  min-height: 1.25rem;
  font-size: 0.875rem;
}

.status {
  min-height: 1.2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-text);
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.btn--block {
  width: 100%;
}

.field {
  margin-bottom: 0.85rem;
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
}

.field input:focus {
  outline: 2px solid var(--esp-dim);
  outline-offset: 0;
  border-color: var(--accent);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-box {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.stat-box__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.stat-box__value {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.stat-box__value--mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  word-break: break-all;
}

.stat-box__value--ok {
  color: var(--accent);
}
