/* Encyclopedia pages (scripts/ssg): an atlas entry in the app's observatory palette */
:root {
  --bg: #090b0f;
  --surface: #181b20;
  --border: #30353b;
  --text: #f0f0eb;
  --text-2: #b9c2c9;
  --text-3: #7d858c;
  --accent: #bd9b6c;
  --font: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text-2);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(240, 240, 235, 0.25); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* masthead */
.w-top { max-width: 1120px; margin: 0 auto; padding: 18px 28px 0; }
.w-mast { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.w-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--text);
  text-decoration: none;
  font: 400 18px/1 var(--serif);
  white-space: nowrap;
}
.w-brand img { display: block; height: 24px; width: auto; opacity: 0.92; }
.w-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 16px; font-size: 14px; }
.w-nav a { padding: 6px 0 10px; border-bottom: 1px solid transparent; color: var(--text-3); text-decoration: none; white-space: nowrap; }
.w-nav a:hover { color: var(--text); }
.w-nav a[aria-current] { border-bottom-color: var(--accent); color: var(--text); }
.w-cta { flex: none; color: var(--accent); font-size: 14px; text-decoration: none; white-space: nowrap; }
.w-cta:hover { color: var(--text); }

.w-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 72px;
  border-top: 1px solid var(--border);
}
.w-crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; font-size: 13px; color: var(--text-3); }
.w-crumbs a { color: var(--text-3); text-decoration: none; }
.w-crumbs a:hover { color: var(--text); }

/* the entry: running text on the left, the data sheet on the right */
article {
  display: grid;
  grid-template-columns: minmax(0, 660px) 300px;
  column-gap: 72px;
  align-items: start;
  margin-top: 40px;
}
article > * { grid-column: 1; }
article > .w-facts:first-of-type {
  grid-column: 2;
  grid-row: 1 / span 40;
  position: sticky;
  top: 24px;
  margin-top: 6px;
}

.w-eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 13px; }
h1 { margin: 0 0 16px; color: var(--text); font: 400 clamp(34px, 5vw, 52px)/1.08 var(--serif); letter-spacing: -0.005em; }
.w-lede { margin: 0 0 8px; color: var(--text); font: 400 20px/1.55 var(--serif); }

h2 { margin: 44px 0 10px; color: var(--text); font: 400 22px/1.3 var(--serif); }
p { margin: 0 0 14px; }
.w-sec p { max-width: 64ch; }

/* data sheet */
.w-facts { width: 100%; border-collapse: collapse; font-size: 14px; }
.w-facts th, .w-facts td { padding: 7px 0; text-align: left; vertical-align: baseline; }
.w-facts th { padding-right: 14px; color: var(--text-3); font-weight: 400; }
.w-facts td { color: var(--text); font-variant-numeric: tabular-nums; }
.w-facts tr + tr th, .w-facts tr + tr td { border-top: 1px solid rgba(48, 53, 59, 0.55); }
article > .w-facts:first-of-type { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
article > .w-facts:first-of-type th { width: 46%; }
.w-sec .w-facts { max-width: 420px; }

/* contents of the encyclopedia */
.w-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; margin: 28px 0 8px; padding: 0; list-style: none; }
.w-index li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.w-index a { font: 400 22px/1.2 var(--serif); text-decoration: none; }
.w-index span { color: var(--text-3); font-size: 14px; font-variant-numeric: tabular-nums; }

/* lists of objects */
.w-list { margin: 6px 0 12px; padding: 0; list-style: none; }
.w-list li { padding: 4px 0; }
.w-cols { columns: 3 190px; column-gap: 28px; }
.w-cols li { break-inside: avoid; }
.w-note { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* search and the A–Z index */
[hidden] { display: none !important; }
.w-search { margin: 28px 0 8px; max-width: 560px; }
.w-search input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font: 400 17px var(--font);
  -webkit-appearance: none;
  appearance: none;
}
.w-search input::placeholder { color: var(--text-3); }
.w-search input:focus { outline: none; border-color: var(--accent); }
article.w-wide { display: block; }
.w-az { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 20px 0 8px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.w-az a, .w-az span { min-width: 30px; padding: 4px 6px; text-align: center; font: 400 19px/1.2 var(--serif); }
.w-az a { text-decoration: none; }
.w-az a[aria-current] { color: var(--accent); }
.w-az span { color: var(--text-3); opacity: 0.45; }
.w-az-body h2, .w-az-results h2 { margin-top: 28px; }
.w-wide .w-cols { columns: 4 220px; }

/* locator widget (/wiki/locator.js), in the Academy's instrument style */
.w-loc { margin: 16px 0 18px; border: 1px solid var(--border); background: #0b0e13; min-height: 300px; }
.w-loc canvas { display: block; width: 100%; touch-action: pan-y; }
.w-loc-ro { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; padding: 9px 12px; border-top: 1px solid var(--border); font-size: 12.5px; }
.w-loc-ro div { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.w-loc-ro span:first-child { color: var(--text-3); white-space: nowrap; }
.w-loc-ro .v { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-loc-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 12px; border-top: 1px solid var(--border); }
.w-loc button { font: inherit; font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: 4px 10px; cursor: pointer; }
.w-loc button:hover { color: var(--text); }
.w-loc-seg { display: inline-flex; }
.w-loc-seg button { margin-left: -1px; border-radius: 0; }
.w-loc-seg button:first-child { margin-left: 0; border-radius: 2px 0 0 2px; }
.w-loc-seg button:last-child { border-radius: 0 2px 2px 0; }
.w-loc-seg button.active { position: relative; z-index: 1; color: var(--text); border-color: var(--accent); }
.w-loc-slider { display: flex; align-items: center; gap: 8px; flex: 1 1 200px; min-width: 0; font-size: 12.5px; color: var(--text-3); }
.w-loc-slider input { flex: 1; min-width: 60px; accent-color: var(--accent); }
.w-loc-slider .v { min-width: 0; }
.w-loc-reset { margin-left: auto; }
.w-loc-cap { margin: 0; padding: 0 12px 10px; color: var(--text-3); font-size: 12px; }
@media (max-width: 560px) { .w-loc-ro { grid-template-columns: 1fr; } .w-loc { min-height: 200px; } }
.w-loc-ctl button.active { color: var(--text); border-color: var(--accent); }
.w-loc-embed { padding: 0 12px 12px; font-size: 12.5px; color: var(--text-3); }
.w-loc-embed p { margin: 0 0 6px; }
.w-loc-embed textarea { display: block; box-sizing: border-box; width: 100%; margin: 0 0 8px; padding: 8px 10px; resize: vertical; font: 12px ui-monospace, Menlo, Consolas, monospace; color: var(--text-2); background: var(--bg); border: 1px solid var(--border); border-radius: 2px; }

/* the locator alone in an iframe on another site (/embed/locator/) */
html:has(.w-embed), .w-embed { height: 100%; margin: 0; padding: 0; overflow: hidden; background: #0b0e13; }
.w-embed .w-loc { margin: 0; min-height: 0; }
.w-loc-brand { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-top: 1px solid var(--border); color: var(--text-2); text-decoration: none; font-size: 12.5px; }
.w-loc-brand img { display: block; height: 18px; width: auto; opacity: 0.92; }
.w-loc-brand .n { color: var(--text); font-family: var(--serif); font-size: 14px; white-space: nowrap; }
.w-loc-brand .more { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); }
.w-loc-brand:hover .more { color: #cdae82; }

/* the telescope view (/wiki/scope.js) */
.w-scope { margin: 16px 0 18px; border: 1px solid var(--border); background: #0b0e13; min-height: 320px; }
.scope-stage { position: relative; background: #000; cursor: zoom-in; }
.scope-stage.close { cursor: zoom-out; }
.scope-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.scope-fail { margin: 0; padding: 40px 16px; color: var(--text-3); font-size: 13px; text-align: center; }
.scope-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 12px; border-top: 1px solid var(--border); font-size: 12.5px; }
.scope-ctl label { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-3); }
.scope-ctl label[hidden] { display: none; }
.scope-ctl .scope-chk { display: flex; align-items: center; flex: 0 0 auto; gap: 4px; white-space: nowrap; color: var(--text-2); }
.scope-chk input { margin: 0; accent-color: var(--accent); }
.scope-ctl label.wide { flex: 1 1 220px; }
.scope-ctl .n { white-space: nowrap; }
.scope-ctl select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: 4px 6px; max-width: 100%; min-width: 0; }
.scope-ctl input[type='range'] { flex: 1; min-width: 70px; accent-color: var(--accent); }
.scope-ctl .v { color: var(--text); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.scope-ro { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 18px; padding: 9px 12px; border-top: 1px solid var(--border); font-size: 12.5px; }
.scope-ro div { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.scope-ro span:first-child { color: var(--text-3); white-space: nowrap; }
.scope-ro .v { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scope-notes { margin: 0; padding: 8px 12px 0 28px; color: var(--text-2); font-size: 12.5px; }
.scope-notes li { margin: 0 0 4px; }
.scope-cap { margin: 0; padding: 6px 12px 10px; color: var(--text-3); font-size: 12px; }
@media (max-width: 560px) { .w-scope { min-height: 220px; } .scope-ctl label { flex: 1 1 100%; } }

/* the one action of the page */
.w-open { margin: 36px 0 0; }
.w-btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 2px;
  background: var(--accent);
  color: #15120d;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.w-btn:hover { background: #cdae82; color: #15120d; }
.w-src { margin-top: 28px; color: var(--text-3); font-size: 13px; max-width: 64ch; }

.w-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 28px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}
.w-foot p { max-width: 72ch; }
.w-foot a { color: var(--text-2); }
.w-langs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; }
.w-langs a { text-decoration: none; }
.w-langs span { color: var(--accent); }

.w-facts td, .w-list li, h1, .w-lede { overflow-wrap: anywhere; }

@media (max-width: 1020px) {
  article { display: block; margin-top: 28px; }
  article > .w-facts:first-of-type { position: static; margin: 24px 0 8px; }
}
@media (max-width: 560px) {
  .w-top { padding: 14px 18px 0; }
  .w-main { padding: 0 18px 56px; }
  .w-foot { padding: 20px 18px 32px; }
  .w-nav { flex-wrap: nowrap; gap: 18px; margin: 12px -18px 0; padding: 0 18px; overflow-x: auto; font-size: 13px; scrollbar-width: none; }
  .w-index { grid-template-columns: minmax(0, 1fr); }
  .w-index a { font-size: 20px; }
  .w-lede { font-size: 18px; }
}
