@font-face {
  font-family: "Helvetica";
  src: url("/style/helvetica.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "New Rodin";
  src: url("/style/NewRodin.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --site-font: "Helvetica", Arial, sans-serif;
  --ticker-font: "Helvetica", Arial, sans-serif;

  --page-background: #ffffff;
  --page-foreground: #000000;
  --panel-background: #ffffff;
  --panel-foreground: #000000;
  --line-color: #000000;
  --ticker-background: #000000;
  --ticker-foreground: #ffffff;
  --focus-color: #000000;
  --panel-width: 380px;
  --motion-fast: 160ms;
  --motion-panel: 220ms;
}

html[data-theme="basic-light"],
html[data-theme="light"] {
  color-scheme: light;
  --page-background: #ffffff;
  --page-foreground: #000000;
  --panel-background: #ffffff;
  --panel-foreground: #000000;
  --line-color: #000000;
  --ticker-background: #000000;
  --ticker-foreground: #ffffff;
  --focus-color: #000000;
}

html[data-theme="basic-dark"],
html[data-theme="dark"] {
  color-scheme: dark;
  --page-background: #000000;
  --page-foreground: #ffffff;
  --panel-background: #000000;
  --panel-foreground: #ffffff;
  --line-color: #ffffff;
  --ticker-background: #ffffff;
  --ticker-foreground: #000000;
  --focus-color: #ffffff;
}


html[data-font="system"] {
  --site-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ticker-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
}

body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--page-background);
  color: var(--page-foreground);
  font-family: var(--site-font);
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
select,
input {
  font: inherit;
}

a {
  color: inherit;
}

button,
select,
input,
a {
  -webkit-tap-highlight-color: transparent;
}

.header {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  z-index: 100;
}

.title {
  margin: 0;
  color: var(--page-foreground);
  text-align: center;
  font-family: var(--site-font);
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.links {
  position: absolute;
  top: 60px;
  right: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 19px;
  font-family: var(--site-font);
  font-size: 18px;
  line-height: 1;
}

.links a,
.settings-menu-button {
  color: var(--page-foreground);
  font-family: var(--site-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.links a:hover,
.settings-menu-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.settings-menu-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.image {
  position: fixed;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: auto;
  max-width: min(70vw, 1100px);
  max-height: 70vh;
  object-fit: contain;
  transform: translate3d(-50%, -50%, 0);
}

/* A quiet typographic fallback keeps the page from looking empty if the JXL asset fails. */
.image-fallback {
  position: fixed;
  top: 50%;
  left: 50%;
  color: var(--page-foreground);
  font-family: var(--site-font);
  font-size: clamp(48px, 9vw, 112px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.9;
  transform: translate3d(-50%, -50%, 0);
  user-select: none;
}

.image-fallback[hidden] {
  display: none;
}

.settings-panel {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1000;
  width: min(var(--panel-width), calc(100vw - 28px));
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px;
  border-right: 2px solid var(--line-color);
  background: var(--panel-background);
  color: var(--panel-foreground);
  transform: translate3d(calc(-100% - 2px), 0, 0);
  transition: transform var(--motion-panel) cubic-bezier(.2, .7, .2, 1),
    background-color 180ms ease, color 180ms ease;
  scrollbar-width: thin;
  scrollbar-color: var(--line-color) transparent;
}

.settings-panel.open {
  transform: translate3d(0, 0, 0);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 32px;
}

.settings-title {
  margin: 0;
  font-family: var(--site-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.settings-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--panel-foreground);
  font-family: var(--site-font);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.settings-close:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.setting-info {
  min-width: 0;
  flex: 1 1 auto;
}

.setting-name {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 700;
}

.setting-description {
  max-width: 34ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  opacity: .82;
}

.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 0;
  border-top: 1px solid var(--line-color);
}

.ticker-subsetting {
  padding: 14px 0 14px 12px;
}

/* Appearance is a compact accordion. Its bar stays transparent and the arrow stays at the far right. */
.appearance-setting {
  display: block;
  padding: 0;
  border-top: 1px solid var(--line-color);
}

.appearance-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 21px 0;
  border: 0;
  background: transparent;
  color: var(--panel-foreground);
  text-align: left;
  cursor: pointer;
}

.appearance-toggle-title {
  display: block;
  margin: 0;
  font-family: var(--site-font);
  font-size: 17px;
  line-height: 1.1;
  font-weight: 700;
}

.appearance-toggle:hover .appearance-toggle-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.appearance-arrow {
  display: inline-block;
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 12px;
  font-size: 24px;
  line-height: .8;
  text-align: right;
  transform: rotate(0deg);
  transition: transform var(--motion-fast) ease;
}

.appearance-setting.open .appearance-arrow {
  transform: rotate(180deg);
}

.appearance-options {
  padding: 0 0 8px;
}

.appearance-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 0;
  border-top: 1px solid var(--line-color);
}

.appearance-control .setting-name {
  margin-bottom: 5px;
}

.auto-theme-options {
  display: block;
  padding-left: 12px;
  border-top: 1px solid var(--line-color);
}

.auto-theme-options[hidden],
.appearance-options[hidden] {
  display: none;
}

.auto-theme-options .appearance-control:first-child {
  border-top: 0;
}

.auto-theme-options .setting-name {
  font-size: 14px;
}

.ticker-setting {
  padding-bottom: 19px;
}

.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--panel-foreground);
  border-radius: 0;
  background: var(--panel-background);
  cursor: pointer;
  transition: background-color var(--motion-fast) ease;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--panel-foreground);
  transition: transform var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.toggle:checked {
  background: var(--panel-foreground);
}

.toggle:checked::after {
  background: var(--panel-background);
  transform: translateX(22px);
}

.theme-select {
  flex: 0 0 auto;
  min-width: 112px;
  max-width: 148px;
  padding: 9px 25px 9px 9px;
  border: 2px solid var(--panel-foreground);
  border-radius: 0;
  background-color: var(--panel-background);
  color: var(--panel-foreground);
  font-family: var(--site-font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}

/* Small WIP labels do not alter the main link's typography. */
.links a .wip {
  font-size: 12px !important;
  font-style: italic !important;
  font-weight: 400;
  line-height: inherit;
  vertical-align: baseline;
}

.toggle:focus-visible,
.theme-select:focus-visible,
.appearance-toggle:focus-visible,
.settings-menu-button:focus-visible,
.settings-close:focus-visible,
.links a:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 4px;
}

.ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 90;
  display: flex;
  align-items: center;
  height: 42px;
  overflow: hidden;
  background: var(--ticker-background);
  color: var(--ticker-foreground);
  font-family: var(--ticker-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease;
}

.ticker.hidden {
  display: none;
}

.ticker-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: ticker-scroll var(--ticker-duration, 30s) linear infinite;
}

.ticker-content {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 24px;
  color: var(--ticker-foreground);
  text-decoration: none;
}

.ticker-item-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ticker-item-information:hover {
  text-decoration: none !important;
}

.ticker-separator {
  display: inline-block;
  flex: 0 0 auto;
  color: var(--ticker-foreground);
}

.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--ticker-width))); }
}

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

  .ticker-track {
    animation-play-state: paused;
  }
}

@media (max-width: 600px) {
  .header {
    top: 22px;
  }

  .links {
    top: 54px;
    right: 16px;
    gap: 16px;
    font-size: 16px;
  }

  .links a,
  .settings-menu-button {
    font-size: 16px;
  }

  .links a .wip {
    font-size: 11px !important;
  }

  .image {
    max-width: 78vw;
    max-height: 64vh;
  }

  .image-fallback {
    font-size: clamp(44px, 15vw, 80px);
  }

  .settings-panel {
    width: 100%;
    padding: 24px;
    border-right: 0;
  }

  .settings-header {
    margin-bottom: 27px;
  }

  .setting-description {
    max-width: 30ch;
  }

  .appearance-control {
    gap: 12px;
    padding: 20px 0;
  }

  .theme-select {
    min-width: 103px;
    max-width: 132px;
    padding: 8px 21px 8px 7px;
    font-size: 11px;
  }

  .auto-theme-options {
    padding-left: 9px;
  }

  .ticker {
    bottom: 15px;
    height: 38px;
    font-size: 16px;
  }

  .ticker-item {
    padding: 0 18px;
  }
}

@media (max-width: 360px) {
  .settings-panel {
    padding: 20px;
  }

  .appearance-control {
    gap: 8px;
  }

  .theme-select {
    min-width: 94px;
    max-width: 112px;
  }

  .setting-description {
    font-size: 12px;
  }
}
