/* Minimal, wide, margin-safe layout */
:root {
  --bg: #0b0e14;
  --ink: #e6edf3;
  --muted: #9fb1c0;
  --accent: #6aa5ff;
  --card: #121826;
  --border: #1e2638;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }

.site-header { border-bottom: 1px solid var(--border); background: #0d121f; position: sticky; top: 0; z-index: 2; }
.title { margin: 0 0 6px 0; font-size: 28px; line-height: 1.2; }
.subtitle { margin: 0 0 12px 0; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.nav a { padding: 6px 10px; border-radius: 8px; background: #0f1524; border: 1px solid var(--border); }

h2 { margin: 28px 0 8px; font-size: 22px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
h3 { margin: 12px 0 6px; font-size: 18px; }

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

/* Equations */
.math-display { overflow-x: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.math-inline { white-space: nowrap; }
.equation-block { margin: 14px 0; }
.equation-title { color: var(--muted); margin-bottom: 6px; font-size: 14px; }

/* Cards and tables */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.small { color: var(--muted); font-size: 13px; }

.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table th, .table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.table thead { background: #0f1524; }
.table.tight td, .table.tight th { padding: 6px 8px; }

/* Figures */
.figure-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.figure { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 10px; }
.figure img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #0d121f; }
.footer-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); align-items: center; }

/* Accessibility: high-contrast focus */
a:focus { outline: 2px dashed var(--accent); outline-offset: 3px; }
