:root {
  color-scheme: dark;
  --bg: #151323;
  --panel: #211d33;
  --line: #453b5b;
  --fg: #faf6ff;
  --muted: #c1b6d2;
  --accent: #ffb8a6;
  --accent-ink: #2e1823;
  --focus: #d3bcff;
  --page-gutter: clamp(16px, 3vw, 40px);
}

:where(a, button):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.site-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1320px;
  min-height: 64px;
  margin-inline: auto;
  padding: env(safe-area-inset-top) max(var(--page-gutter), env(safe-area-inset-right)) 0
    max(var(--page-gutter), env(safe-area-inset-left));
}

.wordmark {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.045em;
}

.site-head .lang {
  position: static;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  transform: none;
  background: var(--bg);
  color: var(--fg);
}

.stage {
  height: auto;
  max-width: 1320px;
  margin-inline: auto;
  padding: clamp(18px, 3vw, 36px) max(var(--page-gutter), env(safe-area-inset-right))
    clamp(24px, 4vw, 48px) max(var(--page-gutter), env(safe-area-inset-left));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: auto;
  gap: clamp(12px, 2vw, 24px);
}

.stage .gowrap {
  position: static;
  grid-column: 1 / -1;
  justify-self: center;
  transform: none;
  padding: 0 0 4px;
  background: none;
}

.stage .panel {
  gap: 12px;
  min-width: 0;
  padding: clamp(10px, 1.7vw, 18px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.phead.r {
  justify-content: start;
  text-align: start;
}

.phead h2 {
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.stage .pair {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  gap: clamp(5px, 1vw, 12px);
}

.stage .media {
  width: 100%;
  max-height: none;
  border-radius: clamp(8px, 1.25vw, 15px);
  animation: none;
}

.stage .media::after {
  padding: 1px;
  background: var(--focus);
  opacity: .38;
  animation: none;
}

.stage .media.round::before,
.stage .go::before,
.stage .go::after {
  display: none;
}

.stage .tag {
  max-width: calc(100% - 8px);
  top: 4px;
  left: 4px;
  padding: 3px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #211d33e8;
}

.stage .tag.hi {
  background: var(--accent);
  color: var(--accent-ink);
}

.stage .go,
.seo .end,
.cta,
.bar a {
  min-height: 48px;
  color: var(--accent-ink);
  box-shadow: 0 8px 24px #ffb8a62b;
}

.stage .go:hover {
  box-shadow: 0 10px 32px #ffb8a647;
}

.seo .lead, article p.lead { color: var(--fg); }
.seo .note, .note, .crumbs, .more a i, article p, article ul { color: var(--muted); }
.seo .note { line-height: 1.55; }
.seo, .tagcloud { background: var(--bg); }
.tagcloud .tags a, article .tags a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--panel);
}

.reading .wrap { max-width: 780px; }
.reading .top { background: var(--panel); }
.reading .top .wrap {
  flex-wrap: wrap;
  gap: 4px clamp(8px, 2vw, 14px);
  height: auto;
  min-height: 60px;
}

.reading .top .back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.reading .top .back[hreflang] { margin-left: 0 !important; }
.reading article { padding-bottom: calc(105px + env(safe-area-inset-bottom)); }
.reading article :is(h1, h2, a) { overflow-wrap: anywhere; }
.reading .more a {
  padding: 14px 0;
  color: var(--fg);
}

.reading .more a:hover b { color: var(--accent); }
.reading .more a i { font-size: 14px; }
.reading .about { background: var(--panel); }
.reading .bar { background: linear-gradient(transparent, var(--bg) 36%); }

@media (min-width: 641px) {
  .stage .gowrap:nth-child(2),
  .stage .gowrap:nth-child(4) {
    grid-row: 2;
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .stage .gowrap { justify-self: stretch; }
  .stage .gobox, .stage .go { width: 100%; }
  .stage .go { justify-content: center; }
  .reading .top .wrap { font-size: 13px; }
}

@media (max-width: 360px) {
  .stage .tag { font-size: 8px; }
  .reading .top .wrap { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
