/* Styles for the programmatic "[trade] invoice template" landing pages.
   Loaded alongside theme.css (whose CSS variables — --surface, --text,
   --border, --brand, --radius, --shadow — this reuses so light/dark match).
   Kept in a same-origin stylesheet because the site CSP blocks inline styles. */

/* --- example invoice card --- */
.example-invoice {
  max-width: 640px;
  margin: 1.5rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
}
.ei-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ei-doc { font-weight: 800; letter-spacing: 0.08em; color: var(--brand); font-size: 1.05rem; }
.ei-biz { text-align: right; }
.ei-muted { color: var(--muted); font-size: 0.85rem; }
.ei-table { width: 100%; border-collapse: collapse; margin: 0.4rem 0 0.8rem; }
.ei-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.4rem;
}
.ei-table td { padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--border); }
.ei-num { text-align: right; white-space: nowrap; }
.ei-totals { width: 100%; max-width: 260px; margin-left: auto; border-collapse: collapse; }
.ei-totals td { padding: 0.3rem 0.4rem; }
.ei-totals .ei-total td {
  border-top: 2px solid var(--border);
  font-weight: 800;
  font-size: 1.05rem;
}
.ei-note { text-align: center; color: var(--muted); font-size: 0.82rem; margin: 1rem 0 0; }

/* --- related-trade links on a trade page --- */
.related { margin-top: 2.4rem; }
.related-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.related-links a { color: var(--brand-ink); }

/* --- hub page grid --- */
.trade-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.trade-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.trade-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.tc-name { font-weight: 700; }
.tc-sub { color: var(--muted); font-size: 0.85rem; }
