/* 98138.world. Hand-written, no build step. Not affiliated with or endorsed by The LEGO Group. */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #5a6573;
  --line: #e2ded5;
  --accent: #1d4f82;
  --accent-ink: #ffffff;
  --sea: #16324f;
  --focus: #e0a100;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 4px 16px rgba(20, 30, 45, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d;
    --surface: #18202a;
    --ink: #e8ebef;
    --muted: #a3adb9;
    --line: #2a3442;
    --accent: #8cc0f0;
    --accent-ink: #0d1520;
    --sea: #0b1a2b;
    --shadow: none;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hash { word-break: break-all; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); margin: .4em 0 .3em; }
h2 { font-size: 1.25rem; margin: 0 0 .7em; }
h3 { font-size: 1rem; margin: 1.2em 0 .4em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5em 1em; z-index: 10; }
.skip:focus { left: 16px; top: 8px; }

/* header / footer */
.site-header { background: var(--sea); color: #fff; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.brand { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; }
.brand-dots { display: inline-flex; gap: 3px; }
.brand-dots i { width: 10px; height: 10px; border-radius: 50%; background: #5b9bd5; display: block; }
.brand-dots i:nth-child(2) { background: #f4f1ea; }
.brand-dots i:nth-child(3) { background: #9fc9a0; }
.site-header nav ul { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }
.site-header nav a { color: #dfe8f2; text-decoration: none; padding: .4rem .7rem; border-radius: 8px; display: block; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .12); }
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: .4em 0; }
.disclaimer strong { color: var(--ink); }

/* home */
.hero { padding: 1.5rem 0 .5rem; max-width: 52rem; }
.hero.narrow { padding-top: 3rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 48rem; margin-top: 0; }
.section-title { margin-top: 1.5rem; }
.gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-link:hover .card-title { color: var(--accent); text-decoration: underline; }
.card-body { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem 1.1rem; }
.card-title { font-weight: 650; font-size: 1.05rem; }
.card-text { color: var(--muted); font-size: .94rem; }
.card-meta { font-size: .85rem; color: var(--muted); margin-top: auto; padding-top: .3rem; }
.stud-img { display: block; width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; background: #222; }
.how { max-width: 52rem; }
.steps { padding-left: 1.2rem; }
.steps li { margin: .4em 0; }

/* map page */
.crumbs { font-size: .9rem; color: var(--muted); margin-top: 1rem; }
.crumbs a { color: var(--muted); }
.viewer { margin: 1rem 0 1.5rem; }
.combos { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .75rem; }
.combos-label { color: var(--muted); font-size: .92rem; }
.combos ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.combos a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .95rem; }
.combos a:hover { border-color: var(--accent); }
.combos a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.combo-id { font-weight: 700; }
.preview { margin: 0; }
.preview img { border-radius: 8px; box-shadow: var(--shadow); max-width: 1280px; }
.preview figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }
.columns { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 0 0 1rem; box-shadow: var(--shadow); min-width: 0; }
.sub { color: var(--muted); font-weight: 400; font-size: .9rem; }
.downloads { list-style: none; margin: 0; padding: 0; }
.downloads li { border-top: 1px solid var(--line); }
.downloads li:first-child { border-top: 0; }
.downloads a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; text-decoration: none; }
.downloads a:hover .dl-name { text-decoration: underline; }
.dl-meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.dl-none { padding: .6rem 0; color: var(--muted); }
.dl-none .dl-meta { display: block; white-space: normal; }
.note { color: var(--muted); font-size: .87rem; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.stats div { background: var(--bg); border-radius: 10px; padding: .7rem .8rem; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: .15rem 0 0; font-size: 1.35rem; font-weight: 650; }
.pct { font-size: .85rem; color: var(--muted); font-weight: 400; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.lots { border-collapse: collapse; width: 100%; font-size: .9rem; }
.lots th, .lots td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.lots thead th { background: var(--bg); font-weight: 600; white-space: nowrap; }
.lots tbody th { font-weight: 500; min-width: 12rem; }
.lots .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lots tbody tr:last-child > * { border-bottom: 0; }
.swatch { vertical-align: -2px; margin-right: .45rem; }
.swatch circle { stroke: rgba(0, 0, 0, .25); stroke-width: 1; }
.id { color: var(--muted); font-size: .85em; }
.layers, .warnings { padding-left: 1.1rem; margin: 0; }
.layers li, .warnings li { margin: .3em 0; }
.warnings li { overflow-wrap: anywhere; }
.citation { border-left: 3px solid var(--line); padding-left: .8rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
.citation p { margin: .25em 0; }
.cite-title { font-weight: 600; }

/* about */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.8em; }
.combo-list div { margin: .5em 0; }
.combo-list dt { font-weight: 650; }
.combo-list dd { margin: 0; color: var(--muted); }
.combo-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .75rem; margin: 1rem 0; }
.combo-figs figure { margin: 0; }
.combo-figs img { border-radius: 6px; }
.combo-figs figcaption { font-size: .85rem; color: var(--muted); margin-top: .3rem; }

@media (max-width: 520px) {
  body { font-size: 15px; }
  .downloads a { flex-direction: column; gap: .1rem; }
  .stats dd { font-size: 1.15rem; }
  .bar { min-height: 50px; }
  .lots tbody th { min-width: 9rem; }
  .lots td:nth-child(2) { min-width: 6.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
