@font-face {
  font-family: "Roboto Serif";
  src: url("/assets/fonts/roboto-serif-cyrillic.woff2?v=1") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Roboto Serif";
  src: url("/assets/fonts/roboto-serif-latin.woff2?v=1") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #eeeeee;
  --text: #171717;
  --muted: #686868;
  --max: 960px;
  --reading-width: 36rem;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html {
  overflow-y: scroll;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto Serif", Georgia, "Times New Roman", serif;
  font-kerning: normal;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  scrollbar-color: var(--muted) var(--bg);
  scrollbar-width: auto;
}
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
html.event-position { overflow-anchor: none; }
a { color: inherit; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  top: 4px;
  left: 4px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ff6400;
  color: #171717;
}
.header-inner {
  width: min(100%, 1024px);
  height: 48px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  overflow: hidden;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 100%;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: 56px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("/assets/huls.svg?v=1") center / contain no-repeat;
  mask: url("/assets/huls.svg?v=1") center / contain no-repeat;
}
.header-tools {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
}
.header-navigation {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
  gap: 16px;
}
/* Keep navigation in the layout so swapping in search cannot move the brand. */
.site-header.is-searching .header-navigation { visibility: hidden; }
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.header-action svg { display: block; width: 24px; height: 24px; }
.search-form[aria-busy="true"] button svg { animation: pulse 1.1s ease-in-out infinite alternate; }
.search-form {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 100%;
}
.tab,
.search-input {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: inherit;
  caret-color: currentColor;
  appearance: none;
}
.search-input::placeholder { font: inherit; color: inherit; opacity: .5; }
.search-input::-webkit-search-cancel-button { display: none; }
.tabs-wrap {
  --fade-left: 0px;
  --fade-right: 0px;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-left), #000 calc(100% - var(--fade-right)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-left), #000 calc(100% - var(--fade-right)), transparent);
}
.tabs-wrap.has-hidden-start { --fade-left: 16px; }
.tabs-wrap.has-hidden-end { --fade-right: 16px; }
.tabs-wrap:has(.tab:focus-visible) { -webkit-mask-image: none; mask-image: none; }
.tabs {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  scroll-padding-inline: 16px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  height: 100%;
  display: inline-flex;
  align-items: center;
  position: relative;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.tab.is-active {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.brand:focus-visible,
.tab:focus-visible,
.header-action:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }

.shell { width: min(100%, var(--max)); margin: 0 auto; padding: 0 24px 80px; }
.shell:focus { outline: none; }
.feed,
.search-feedback,
.status-state {
  max-width: calc(var(--reading-width) + 48px);
  margin-left: auto;
  margin-right: auto;
}
.feed { padding-top: 24px; }
.search-feedback {
  margin-top: 24px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}
.feed-date {
  margin: 0 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}
.feed > .event + .event { margin-top: 40px; }
.feed > .event + .feed-date { margin-top: 48px; }
.event {
  display: grid;
  grid-template-columns: 40px minmax(0, var(--reading-width));
  column-gap: 8px;
  align-items: baseline;
  content-visibility: auto;
  contain-intrinsic-size: 220px;
  scroll-margin-top: 72px;
}
.event-position .event { content-visibility: visible; }
.event:focus { outline: none; }
.event-copy,
.empty-state strong {
  font-size: 16px;
  line-height: 24px;
}
.event-copy {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  max-width: var(--reading-width);
  font-weight: 400;
  letter-spacing: 0;
  text-wrap: pretty;
}
.event-title,
.event-summary { display: inline; margin: 0; font: inherit; color: inherit; }
.empty-state strong { font-weight: 600; }
.event-time,
.event-memory,
.feed-sentinel::after,
.feed-error-message,
.inline-link {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}
.event-time {
  grid-column: 1;
  grid-row: 1;
  display: block;
  font-variant-numeric: tabular-nums;
  width: fit-content;
}
.event-memory {
  grid-column: 2;
  margin: 4px 0 0;
}
.event-memory { grid-row: 2; }
.event-memory a {
  color: inherit;
  text-underline-offset: 3px;
}
.event-memory a:hover { text-decoration-thickness: 2px; }
.event-memory a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.new-events-notice {
  position: sticky;
  top: 60px;
  z-index: 10;
  height: 0;
  display: flex;
  justify-content: center;
}
.new-events {
  display: block;
  width: fit-content;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.new-events:hover { text-decoration-thickness: 2px; }
.new-events:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.feed-sentinel { height: 120px; margin-top: 40px; }
.feed-sentinel[data-direction="newer"] { margin: 0 0 40px; }
.feed-sentinel::after {
  content: "···";
  display: block;
  margin: 40px auto 0;
  text-align: center;
  letter-spacing: .2em;
  animation: pulse 1.1s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }

.feed-sentinel.is-error {
  height: auto;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.feed-sentinel.is-error::after { display: none; }
.feed-retry {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.feed-retry:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.empty-state { padding: 40px 0 16px; text-align: center; }
.inline-link {
  display: inline-block;
  width: fit-content;
  margin-top: 12px;
  color: var(--text);
  text-underline-offset: 3px;
}
.inline-link:hover { text-decoration-thickness: 2px; }
.inline-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.status-state {
  padding-left: 48px;
  padding-top: 64px;
}

.status-state h1 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.status-state p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

@media (max-width: 640px) {
  .header-inner { padding: 0 16px; gap: 24px; }
  .shell { padding-left: 16px; padding-right: 16px; }
  .feed, .status-state { max-width: var(--reading-width); }
  .feed { padding-top: 16px; }
  .feed > .event + .event { margin-top: 32px; }
  .event { grid-template-columns: 40px minmax(0, 1fr); scroll-margin-top: 64px; }
  .status-state { padding-left: 0; padding-top: 48px; }
}

@media (width < 360px) {
  .event { grid-template-columns: minmax(0, 1fr); row-gap: 4px; align-items: start; }
  .event-copy { grid-column: 1; grid-row: 2; }
  .event-memory { grid-column: 1; grid-row: 3; margin-top: 0; }
}

@media (prefers-color-scheme: dark) {
  :root { --bg: #171717; --text: #eeeeee; --muted: #a0a0a0; }
}

@media (forced-colors: active) {
  html { scrollbar-color: auto; }
  .tabs-wrap { -webkit-mask-image: none; mask-image: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
