:root {
  color-scheme: dark;
  scrollbar-gutter: stable;
  font: 16px/1.65 "Segoe UI", Arial, sans-serif;
  --page: #1e1f22;
  --panel: #27282d;
  --art-panel: #292531;
  --text: #f1eff7;
  --muted: #b4b2c0;
  --accent: #bb9aff;
  --line: #414149;
  --strong-line: #766389;
  background: var(--page);
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
a:hover, button:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.18; font-weight: 550; }
h1 { font-size: clamp(2.3rem, 4vw, 3.8rem); letter-spacing: -.045em; }
h2 { font-size: 1.6rem; letter-spacing: -.025em; }
img { max-width: 100%; display: block; }
main { flex: 1; }
main:focus { outline: none; }
.wrap { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.accent { color: var(--accent); }
.eyebrow { color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--accent); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 5; padding: 12px 20px; background: var(--accent); color: var(--page); }
.skip-link:focus { top: 12px; color: var(--page); }

.site-header { position: relative; z-index: 2; min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-block; min-height: 44px; font-size: .82rem; font-weight: 750; line-height: 1.17; letter-spacing: .055em; }
.brand-logo { display: flex; align-items: center; gap: 12px; }
.brand-caption { display: block; margin-top: 8px; color: var(--muted); font-size: .65rem; font-weight: 400; line-height: 1.35; letter-spacing: 0; }
.brand-mark { width: 29px; height: 29px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-8deg); flex: 0 0 auto; }
.brand-mark i { background: var(--accent); }
.brand-mark i:last-child { border: 1px solid var(--accent); background: transparent; }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: .875rem; }
.site-nav a { padding-block: 14px; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); }
.site-nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 11px; text-decoration-thickness: 2px; }
.menu-toggle { display: none; }
.mobile-menu { display: none; }
.header-actions { display: flex; align-items: center; gap: 28px; min-width: 0; }
.header-account { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; font-size: .875rem; font-weight: 650; }
.header-account:hover, .header-account[aria-current] { color: var(--accent); }
.header-account img { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #a68bc8; border-radius: 50%; padding: 2px; background: #201a2a; }
.header-account:hover img, .header-account:focus-visible img { border-color: var(--accent); box-shadow: 0 0 0 3px #bb9aff18; }
.header-account:focus-visible { outline-width: 2px; border-radius: 6px; }
.header-account span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-signin { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.header-signin[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 11px; }
@media (min-width: 761px) and (max-width: 1050px) {
  .header-actions { gap: 16px; }
  .site-nav { gap: 16px; }
  .header-account span { max-width: 90px; }
}

.page-intro { padding-block: 57px 49px; }
.page-description { margin-top: 19px; max-width: 60ch; color: var(--muted); }
.home-feed { padding-block: 46px 34px; }
.section-title { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.045em; }
.empty-feed { margin-top: 22px; padding: 22px 25px; border-left: 2px solid var(--line); }
.empty-feed p + p { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.home-projects { padding-block: 34px 54px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 17px; }
.section-heading .text-link { color: var(--muted); margin-left: auto; }

.project-preview { max-width: 380px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); }
.project-preview-art { background: var(--art-panel); }
.project-preview-art img { width: 100%; height: 240px; object-fit: contain; }
.factory-art { filter: hue-rotate(165deg) saturate(.82); }
.project-preview > div { padding: 24px; }
.project-preview .eyebrow { color: var(--accent); font-size: .6875rem; letter-spacing: .08em; }
.project-preview h3 { margin-top: 11px; font-size: 1.6rem; letter-spacing: -.025em; }
.project-preview p:not(.eyebrow) { color: var(--muted); margin-top: 13px; font-size: .95rem; max-width: 38ch; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 12px; font-size: .8rem; }
.linked-card { position: relative; }
.linked-card:hover, .linked-card:focus-within { border-color: var(--accent); }
.linked-card:focus-within { outline: 3px solid var(--accent); outline-offset: 5px; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus-visible { outline: none; }
.card-arrow { color: var(--accent); font-size: .75em; white-space: nowrap; }

.games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding-bottom: 70px; }
.game-tile { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); }
.game-tile-art { background: var(--art-panel); }
.game-tile-art img { width: 100%; height: 325px; object-fit: contain; }
.game-tile-art figcaption { padding: 0 24px 16px; font-size: .6875rem; color: var(--muted); }
.game-tile-body { padding: 27px; }
.game-tile h2 { font-size: 1.8rem; margin-top: 14px; }
.game-tile-body > p:not(.eyebrow) { color: var(--muted); margin-top: 15px; font-size: .94rem; }
.studio-copy { max-width: 640px; padding-bottom: 62px; font-size: 1.12rem; color: var(--muted); }
.studio-copy p + p { margin-top: 23px; }
.studio-copy a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.game-heading { padding-block: 24px 42px; }
.game-heading h1 { margin-top: 14px; }
.game-feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding-block: 35px 62px; border-top: 1px solid var(--line); }
.game-feed .empty-feed { max-width: 56ch; }
.game-cover { align-self: start; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--art-panel); }
.game-cover img { width: 100%; height: 220px; object-fit: contain; }
.game-cover figcaption { padding: 0 18px 15px; color: var(--muted); font-size: .6875rem; }

.journal-feed { max-width: 820px; padding-bottom: 62px; }
.journal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.journal-filters a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.journal-filters a[aria-current] { color: var(--accent); border-color: var(--accent); background: #bb9aff14; }
.hashtag-links { display: flex; flex-wrap: wrap; gap: 0 16px; padding: 0; margin: 14px 0 0; list-style: none; }
.hashtag-links li { max-width: 100%; }
.hashtag-links a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; color: var(--accent); font-size: .85rem; overflow-wrap: anywhere; }
.hashtag-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.topic-filter { max-width: 820px; margin-bottom: 28px; }
.topic-filter-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
.topic-filter-header h2 { margin: 0; font-size: 1rem; font-weight: 650; }
.topic-filter-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .85rem; }
.topic-reset { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .85rem; text-decoration: underline; text-underline-offset: 4px; }
.topic-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.topic-options li { min-width: 0; max-width: 100%; }
.topic-chip { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: 8px 18px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.topic-chip:hover { color: var(--text); border-color: var(--strong-line); }
.topic-chip[aria-current] { color: #171320; border-color: var(--accent); background: var(--accent); }
.topic-chip:focus-visible { border-radius: 24px; }
.journal-search { margin-bottom: 28px; }
.journal-search label { display: block; margin-bottom: 8px; font-weight: 600; }
.search-controls { display: flex; gap: 12px; align-items: center; }
.search-input { position: relative; flex: 1; min-width: 0; }
.search-controls input { width: 100%; min-height: 46px; padding: 10px 46px 10px 14px; border: 1px solid var(--strong-line); border-radius: 6px; background: var(--panel); color: var(--text); font: inherit; }
.search-controls input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-controls input::placeholder { color: var(--muted); opacity: 1; }
.search-controls input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.search-controls button { min-height: 46px; padding: 10px 22px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: #171320; }
.search-controls button:hover { background: #cdb4ff; }
.search-reset { position: absolute; inset-block: 1px; right: 1px; width: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 5px; }
.search-reset:hover { color: var(--text); }
.search-reset:focus-visible { outline-offset: -4px; }
.journal-search .errorlist { padding-left: 22px; color: #ffb9c0; }
.search-summary { margin-top: 22px; color: var(--muted); overflow-wrap: anywhere; }
.empty-feed a { color: var(--accent); text-decoration: underline; }
.publication-feed { display: grid; gap: 22px; margin-top: 22px; }
.post-card { min-width: 0; padding: 26px 28px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); overflow-wrap: anywhere; }
.post-card-pinned { border-color: var(--strong-line); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; color: var(--muted); font-size: .75rem; }
.post-meta a, .post-pin { color: var(--accent); }
.post-meta a { text-decoration: underline; text-underline-offset: 4px; }
.post-card h2, .post-card h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.3; }
.post-excerpt { margin-top: 16px; color: var(--muted); }
.post-card .post-body { padding-top: 16px; font-size: 1rem; }
.post-body > * + * { margin-top: 16px; }
.post-body h2, .post-body h3 { font-size: 1.2rem; }
.post-read { margin-top: 14px; color: var(--accent); }
.feed-pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.feed-pagination span { color: var(--muted); font-size: .8rem; }
.home-feed .publication-feed { max-width: 820px; }

.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding-block: 23px; font-size: .7rem; color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; letter-spacing: .04em; color: var(--text); }
.social-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.social-links a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--text); text-decoration: none; }
.social-icon { display: block; width: 19px; height: 17px; flex: 0 0 auto; color: var(--accent); }
.site-footer .social-icon { width: 16px; height: 15px; }
.social-links a:hover { color: var(--accent); }
.studio-copy .social-links { margin-top: 24px; font-size: 1rem; }

.article-page { max-width: 760px; margin-inline: auto; padding-bottom: 64px; overflow-wrap: anywhere; }
.article-heading { padding-block: 28px 34px; border-bottom: 1px solid var(--line); }
.article-heading h1 { margin-top: 17px; font-size: clamp(2rem, 4vw, 3.25rem); }
.article-notice { margin-top: 20px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--panel); color: var(--muted); font-size: .9rem; }
.article-body { padding-top: 32px; font-size: 1.08rem; line-height: 1.8; }
.article-body > * + * { margin-top: 22px; }
.article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 { margin-block: 40px 16px; line-height: 1.35; }
.article-body h2 { font-size: 1.7rem; }
.article-body h3 { font-size: 1.35rem; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.article-body ul, .article-body ol { padding-left: 1.5em; }
.article-body li + li { margin-top: 8px; }
.article-body blockquote { margin-inline: 0; padding-left: 22px; border-left: 2px solid var(--accent); color: var(--muted); }
.article-body code { font-size: .9em; background: var(--panel); border-radius: 4px; padding: 2px 5px; }
.article-body pre { max-width: 100%; padding: 20px; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.article-body pre code { padding: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); }
.content-image { margin: 22px 0 0; min-width: 0; }
.content-image img { display: block; max-width: 100%; width: 100%; height: auto; border-radius: 7px; }
.content-image figcaption { margin-top: 10px; color: var(--muted); font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
.game-screenshots { padding-block: 0 32px; }
.game-screenshots .section-title { margin-bottom: 24px; }
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.screenshot-grid .content-image { margin: 0; }
.content-video { width: min(100%, var(--video-width, 100%)); max-width: 100%; margin: 24px 0; }
.content-video video { display: block; width: 100%; height: auto; border-radius: 6px; background: #12121a; }
.video-error { margin-top: 8px; color: var(--muted); font-size: .85rem; }
.game-videos { padding-bottom: 32px; }
.game-videos .content-video { margin-bottom: 0; }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 64px); }
  .game-feed-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 94px; padding-block: 15px; flex-wrap: wrap; gap: 12px; }
  .wordmark { font-size: .73rem; }
  .brand-logo { gap: 9px; }
  .brand-caption { font-size: .625rem; }
  .brand-mark { width: 25px; height: 25px; }
  .site-nav { flex-basis: 100%; gap: 8px 22px; flex-wrap: wrap; }
  .enhanced .site-nav { display: none; }
  .header-actions { flex-basis: 100%; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
  .enhanced .header-actions:not(.header-actions--account) { flex-basis: auto; }
  .header-actions .site-nav { order: 3; }
  .header-actions .menu-toggle { order: 1; }
  .header-actions .header-account, .header-actions .header-signin { order: 2; margin-left: auto; }
  .header-account span { max-width: 160px; }
  .menu-toggle:not([hidden]) { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 11px; background: transparent; border: 1px solid var(--strong-line); border-radius: 4px; font-size: .8rem; }
  .menu-toggle[aria-expanded="true"] { background: #bb9aff20; border-color: var(--accent); color: var(--accent); }
  .menu-icon { position: relative; width: 14px; height: 14px; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; width: 14px; height: 1.5px; background: currentColor; }
  .menu-icon::before { top: 4px; }
  .menu-icon::after { top: 9px; }
  .menu-toggle[aria-expanded="true"] .menu-icon::before { top: 6px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::after { top: 6px; transform: rotate(-45deg); }
  .mobile-menu { display: flex; flex-direction: column; position: absolute; top: calc(100% + 10px); right: 0; width: min(290px, 100%); max-height: calc(100dvh - 120px); overflow-y: auto; padding: 8px; background: var(--panel); border: 1px solid var(--strong-line); border-radius: 8px; box-shadow: 0 12px 32px #0005; }
  .mobile-menu a { padding: 13px 16px; border-radius: 4px; font-size: 1rem; }
  .mobile-menu a[aria-current] { background: #bb9aff14; color: var(--accent); }
  .mobile-menu a:focus-visible { outline-offset: -3px; }
  .page-intro { padding-block: 35px 32px; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .home-feed { padding-block: 31px 25px; }
  .empty-feed { margin-top: 18px; padding: 12px 18px; }
  .home-projects { padding-block: 25px 36px; }
  .project-preview-art img { height: 205px; }
  .project-preview > div { padding: 22px; }
  .games-grid { grid-template-columns: 1fr; padding-bottom: 40px; }
  .game-tile-art img { height: 250px; }
  .game-tile-body { padding: 22px; }
  .game-tile h2 { font-size: 1.6rem; }
  .studio-copy { font-size: 1rem; padding-bottom: 36px; }
  .breadcrumbs { padding-top: 15px; }
  .game-heading { padding-block: 18px 30px; }
  .game-feed-layout { grid-template-columns: 1fr; gap: 32px; padding-block: 27px 36px; }
  .game-cover { max-width: 380px; }
  .post-card { padding: 20px 18px 12px; }
  .journal-feed { padding-bottom: 36px; }
  .site-footer { gap: 5px 18px; }
  .footer-brand { flex-basis: 100%; }
  .site-footer > span:last-child { margin-left: auto; }
}


@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
