/* Reseller Toolbox — clean, fast, mobile-friendly. Light theme, one accent. */
:root {
  --accent: #0b6e4f;
  --accent-dark: #095c42;
  --text: #1c2430;
  --muted: #5a6472;
  --bg: #ffffff;
  --surface: #f4f6f5;
  --border: #d9dee3;
  --good-bg: #e6f4ec;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.4em 0 0.3em; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.1rem; margin: 1.2em 0 0.4em; }
p { margin: 0.5em 0 0.9em; }
ul, ol { margin: 0.5em 0 1em; padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { color: var(--accent); }
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  font-size: 0.95rem;
}
.site-header nav a { color: var(--muted); text-decoration: none; padding: 0.2rem 0; }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; }

/* Layout */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}
.lede { font-size: 1.08rem; color: var(--muted); }
section { margin-bottom: 1.5rem; }

/* Calculator */
.calculator {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.3rem;
  margin: 1rem 0 1.5rem;
}
.calculator h2 { margin-top: 0; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.field input, .field select {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  width: 100%;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.checkbox-row input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }

/* Results */
.results {
  margin-top: 1.1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.results h3 { margin-top: 0; }
.results dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  margin: 0;
}
.results dt { color: var(--muted); }
.results dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.results dd.negative { color: #b3261e; }
.results .total-row dt, .results .total-row dd { font-weight: 800; color: var(--text); }
.reverse { margin-top: 1.1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.reverse .reverse-result { font-weight: 700; font-size: 1.1rem; margin-top: 0.5rem; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0.75rem 0 1rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
td.num, th.num { text-align: right; }
thead th { background: var(--surface); font-weight: 700; }
tbody tr.best { background: var(--good-bg); font-weight: 700; }
.table-wrap { overflow-x: auto; }

/* Callouts / example */
.example, .callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 0.9rem 1rem;
}
.example p, .callout p { margin: 0.4em 0; }
.note { font-size: 0.9rem; color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 1rem 2rem;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 860px;
  margin: 0 auto;
}
.site-footer p { margin: 0.3em 0; }

/* Log list */
.log-list { list-style: none; padding-left: 0; }
.log-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.log-list strong { display: block; }

/* Responsive */
@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
  .form-grid { grid-template-columns: 1fr; }
  main { padding: 0.8rem 0.8rem 2.5rem; }
  .calculator { padding: 0.9rem 0.9rem 1.1rem; }
  table { font-size: 0.88rem; }
  th, td { padding: 0.45rem 0.4rem; }
}
