/* Foundry Design Language — Base Overrides
   Global resets, body, typography, tables, forms.
   Loaded after Bootstrap 2.3.2 and emoncms-base.css. */

/* ── Global Resets (Foundry: hard edges, no shadows) ── */
/* !important required: Bootstrap has ~246 border-radius declarations */
*, *::before, *::after {
  border-radius: 0 !important;
}

/* box-shadow reset scoped to Bootstrap components, not universal.
   Universal !important would block all future box-shadow use. */
.btn, .well, .modal, .dropdown-menu, .popover, .tooltip-inner,
.navbar, .navbar-inner, .input-append, .input-prepend,
.pagination ul > li > a, .nav-tabs > li > a,
input, textarea, select {
  box-shadow: none !important;
}

/* ── Body ── */
body {
  background-color: var(--f-bg);
  color: var(--f-body);
  font-family: var(--f-font-body);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--f-font-display);
  color: var(--f-ink);
  letter-spacing: var(--f-tracking-tight);
  font-weight: 400;
}

h4, h5, h6 {
  font-family: var(--f-font-body);
  color: var(--f-ink);
}

a {
  color: var(--f-ember);
  transition: color 0.15s ease;
}
a:hover, a:focus {
  color: var(--f-rust);
}

code, pre {
  font-family: var(--f-font-mono);
  background-color: var(--f-surface-alt);
  border: 1px solid var(--f-border);
  color: var(--f-body);
}

pre {
  padding: 16px 20px;
}

code {
  padding: 2px 6px;
}

/* ── Tables ── */
table {
  border-collapse: collapse;
  width: 100%;
}

thead th {
  font-family: var(--f-font-mono);
  font-size: 10px;
  letter-spacing: var(--f-tracking);
  text-transform: uppercase;
  color: var(--f-muted);
  text-align: left;
  padding: 8px 14px 8px 0;
  border-bottom: 2px solid var(--f-ink);
  font-weight: 500;
}

tbody td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--f-border);
  color: var(--f-body);
  font-size: 13px;
}

tbody tr:hover {
  background-color: var(--f-surface-alt);
}

/* ── Forms ── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--f-faint);
  color: var(--f-ink);
  font-family: var(--f-font-body);
  font-size: 15px;
  padding: 8px 0;
  transition: border-color 0.15s ease;
  outline: none;
}

/* Select keeps its border for usability (indicates interactivity) */
select {
  background-color: var(--f-surface);
  border: 1px solid var(--f-border);
  color: var(--f-ink);
  font-family: var(--f-font-body);
  font-size: 15px;
  padding: 8px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-bottom: 2px solid var(--f-ember);
  outline: none;
}

select:focus {
  border-color: var(--f-ember);
  outline: none;
}

label {
  font-family: var(--f-font-mono);
  font-size: 12px;
  letter-spacing: var(--f-tracking);
  text-transform: uppercase;
  color: var(--f-muted);
}

/* ── Selection ── */
::selection {
  background-color: var(--f-ember);
  color: var(--f-bg);
}

/* ── Scrollbar (webkit) ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--f-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--f-faint);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--f-muted);
}
