/* lunarsim.org — light, simple, readable */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --line: #e3e2de;
  --text: #1d1d1f;
  --muted: #5f6066;
  --accent: #2456a6;
  --accent-soft: #e8eefa;
  --good: #1f7a45;
  --good-soft: #e6f4ea;
  --bad: #b3261e;
  --bad-soft: #fbe9e7;
  --warn: #8a5a00;
  --radius: 10px;
  --maxw: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-top: .2em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code { font-family: var(--mono); font-size: .92em; background: var(--bg-soft); padding: .1em .35em; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; color: var(--text); font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-dot { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d9d8d3, #8f8e89); border: 1px solid #7a7974; }
.nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .95rem; }
.nav a[aria-current="page"], .nav a:hover { color: var(--text); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

/* sections */
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--line); }
.lead { font-size: 1.15rem; color: #34353a; max-width: 760px; }
.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: .5em; }
.hero { padding: 56px 0 40px; }
.hero h1 { max-width: 820px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font: 600 1rem var(--font); cursor: pointer; }
.btn:hover { background: var(--bg-soft); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #1d4888; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .nav { gap: 12px; } }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; }
.card h3 { margin-bottom: .35em; }
.stat { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .92rem; }

figure { margin: 0; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.figure-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: #fff; }

/* seven-suns strip */
.suns { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.suns figure img { border-radius: 6px; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #000; }
.suns figcaption { font-size: .78rem; margin-top: 4px; text-align: center; }
.suns .ref img { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 820px) { .suns { grid-template-columns: repeat(4, 1fr); } }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 600; color: var(--muted); border-bottom: 1px solid #cfcec9; }
tr.group td { background: var(--bg-soft); font-weight: 600; color: var(--muted); text-align: left; font-size: .85rem; }
td.best { font-weight: 700; }

/* pipeline diagram */
.pipeline { display: grid; grid-template-columns: repeat(5, auto); align-items: center; gap: 10px; justify-content: start; }
.pipeline .box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; font-size: .92rem; max-width: 200px; }
.pipeline .box b { display: block; font-size: .95rem; }
.pipeline .arrow { color: var(--muted); font-size: 1.2rem; }
@media (max-width: 820px) { .pipeline { grid-template-columns: 1fr; } .pipeline .arrow { transform: rotate(90deg); justify-self: start; margin-left: 20px; } .pipeline .box { max-width: none; } }

.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 8px 8px 0; }
.kbd { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: #fff; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.pill.good { background: var(--good-soft); color: var(--good); border-color: #bfe0ca; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: #f2c4bf; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: #c8d6f0; }
pre.cite { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font: .82rem/1.5 var(--mono); }
@media (max-width: 640px) {
  .site-header .wrap { height: auto; flex-wrap: wrap; gap: 4px 16px; padding-top: 10px; padding-bottom: 10px; }
  .nav { margin-left: 0; width: 100%; gap: 6px 16px; }
  .nav a { font-size: .9rem; }
  section { padding: 36px 0; }
  .hero { padding: 36px 0 28px; }
}
