:root { color-scheme: dark; --bg: #090909; --surface: #101010; --text: #ededeb; --muted: #aaa9a5; --line: #30302e; --gold: #edbb59; --link: #8bcad9; }
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.75 Arial, Helvetica, sans-serif; }
a { color: var(--link); text-underline-offset: 4px; }
a:hover { color: #d9f5fc; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.global-header { position: sticky; top: 0; z-index: 5; min-height: 64px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--bg); }
.menu-primary { display: flex; align-items: center; gap: 32px; width: 100%; }
.brand { color: var(--gold); text-decoration: none; font: bold 17px Monaco, Consolas, monospace; }
.global-nav { display: flex; align-items: stretch; gap: 24px; }
.global-nav a { display: flex; align-items: center; min-height: 64px; color: var(--muted); text-decoration: none; font: 11px Monaco, Consolas, monospace; text-transform: uppercase; border-bottom: 2px solid transparent; }
.global-nav a:hover { color: var(--text); }
.global-nav a[aria-current] { color: var(--gold); border-color: var(--gold); }
.blog-shell { width: 100%; max-width: 1280px; margin: 0 auto; padding: 48px 40px 96px; --reading-width: 1200px; }
.post-preview { max-width: 760px; margin: 0 auto; padding: 0 0 40px; }
.post-preview time, .research-post time { font: 12px/1.5 Arial, sans-serif; color: var(--gold); }
.post-preview h2 { margin: 14px 0 18px; font-size: 30px; line-height: 1.3; }
.post-preview h2 a { color: var(--text); text-decoration: none; }
.post-preview h2 a:hover { color: var(--gold); }
.post-preview p { color: var(--muted); font-size: 17px; }
.post-image { display: block; margin-top: 28px; }
.post-image img, .research-post img { display: block; width: 100%; height: auto; }
.research-post { max-width: none; padding: 0; }
.research-post > header { max-width: var(--reading-width); margin: 48px auto 56px; text-align: center; }
.research-post h1 { margin: 20px 0 0; font-size: 42px; line-height: 1.2; text-wrap: balance; }
.research-post > p, .research-post > h2 { max-width: var(--reading-width); margin-left: auto; margin-right: auto; }
.research-post > p { margin-top: 20px; margin-bottom: 20px; color: #c9cac7; font-size: 20px; line-height: 1.75; }
.research-post > h2 { margin-top: 56px; margin-bottom: 20px; font-size: 28px; line-height: 1.35; scroll-margin-top: 90px; }
.research-post figure { max-width: 1400px; margin: 48px auto 64px; }
.research-post figure a { display: block; cursor: zoom-in; }
.research-post figcaption { max-width: 720px; margin: 14px auto 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.decile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin: 36px 0; }
.result-table { min-width: 0; }
.result-table table { width: 100%; border-collapse: collapse; font: 16px/1.6 Arial,sans-serif; font-variant-numeric: tabular-nums; }
.result-table caption { text-align: left; color: var(--muted); padding-bottom: 12px; font-size: 13px; }
.result-table th, .result-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.result-table thead th { color: var(--gold); font-size: 14px; font-weight: 500; }
.result-table tbody th { text-align: left; font-weight: 400; color: var(--text); }
.result-table thead th:first-child { text-align: left; }
.decile-table table { table-layout: auto; }
.decile-table th, .decile-table td { padding: 9px 10px; }
.image-viewer { width: 96vw; height: 94dvh; max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); background: #101010; color: var(--text); }
.image-viewer::backdrop { background: #000c; }
.viewer-toolbar { height: 56px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.viewer-toolbar button { width: 40px; height: 40px; border: 1px solid var(--line); background: #191919; color: var(--text); font-size: 22px; }
.viewer-toolbar button[data-action="fit"] { width: 64px; font-size: 13px; }
.viewer-toolbar button:hover { color: var(--gold); border-color: var(--gold); }
.viewer-toolbar button:disabled { opacity: .35; cursor: default; }
.viewer-viewport { height: calc(100% - 56px); overflow: auto; overscroll-behavior: contain; cursor: grab; }
.viewer-viewport:active { cursor: grabbing; }
.viewer-stage { display: flex; align-items: center; justify-content: center; min-width: 100%; min-height: 100%; width: max-content; }
.viewer-stage img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.research-post figure a:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.decile-table th, .decile-table td { overflow-wrap: anywhere; }
.decile-table caption { color: var(--gold); font-size: 20px; font-weight: 600; }
@media (max-width: 1199px) {
  .decile-grid { grid-template-columns: minmax(0, 1fr); }
  .result-table { width: 100%; max-width: 660px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .global-header { padding: 0 16px; }
  .menu-primary { gap: 20px; }
  .global-nav { gap: 12px; }
  .global-nav a { font-size: 10px; }
  .blog-shell { width: 100%; padding: 28px 16px 64px; }
  .research-post > header { margin: 36px auto 40px; }
  .research-post h1 { font-size: 30px; }
  .research-post > h2 { font-size: 22px; margin-top: 40px; }
  .research-post > p { font-size: 16px; line-height: 1.8; }
  .post-preview h2 { font-size: 26px; }
  .research-post figure { margin: 32px auto 44px; }
  .result-table th, .result-table td { padding: 12px 5px; font-size: 12px; }
  .decile-table caption { font-size: 16px; }
}
