/* ============================================================
   Homepage release notes — prototype
   A right-edge index tab beside the first page + a paper drawer.
   Matches the v3.1 editorial system.
   ============================================================ */

.release-tab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 60;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 17px 9px 17px 8px;
  background: #0b0b0a;
  color: #f2eee3;
  border: 0;
  border-left: 1px solid rgba(242, 238, 227, 0.14);
  border-top: 2px solid #e8472a;
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: opacity 0.24s ease, transform 0.3s ease, background 0.2s ease;
}
.release-tab span { display: block; }
.release-dot {
  width: 5px;
  height: 5px;
  background: #e8472a;
  flex: 0 0 auto;
}
.release-tab:hover { background: #e8472a; }
.release-tab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(110%, -50%);
}

/* mobile inline entry, hidden on desktop */
.release-chip {
  display: none;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 9px 12px;
  border: 1px solid rgba(242, 238, 227, 0.26);
  background: transparent;
  color: #f2eee3;
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  cursor: pointer;
}
.release-chip i { width: 5px; height: 5px; background: #e8472a; }
.release-chip b { color: #e8472a; font-weight: 400; }

.release-backdrop {
  position: fixed;
  inset: 0;
  z-index: 290;
  background: rgba(11, 11, 10, 0.72);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.release-backdrop.is-on { opacity: 1; }

.release-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 300;
  height: 100svh;
  width: min(460px, 94vw);
  display: flex;
  flex-direction: column;
  background: #f2eee3;
  color: #12110f;
  border-left: 1px solid rgba(18, 17, 15, 0.22);
  box-shadow: -40px 0 90px rgba(0, 0, 0, 0.32);
  transform: translateX(102%);
  transition: transform 0.46s cubic-bezier(0.76, 0, 0.24, 1);
}
.release-panel.is-open { transform: none; }
.release-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.release-head {
  flex: 0 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(18, 17, 15, 0.18);
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: 7.5px;
  letter-spacing: 0.24em;
  color: #6f6a5f;
}
.release-close {
  border: 0;
  background: none;
  padding: 4px 0;
  color: #12110f;
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  cursor: pointer;
}
.release-close:hover { color: #e8472a; }

.release-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 26px 28px 18px;
}

.release-ver {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(18, 17, 15, 0.2);
}
.release-ver strong {
  font-family: "Instrument Serif", "Noto Serif SC", Georgia, serif;
  font-weight: 400;
  font-size: 54px;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.release-ver span {
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: #8a8273;
  white-space: nowrap;
}

.release-body h2 {
  margin: 18px 0 10px;
  font-family: "Instrument Serif", "Noto Serif SC", Georgia, serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.release-body h2 b { color: #e8472a; font-weight: 400; }

.release-lede {
  font-size: 12px;
  line-height: 1.85;
  color: #6f6a5f;
}

.release-list {
  list-style: none;
  margin: 20px 0 0;
  border-top: 1px solid rgba(18, 17, 15, 0.16);
}
.release-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(18, 17, 15, 0.16);
}
.release-list .no {
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: #e8472a;
  padding-top: 3px;
}
.release-list b {
  display: block;
  margin-bottom: 3px;
  font-family: "Instrument Serif", "Noto Serif SC", Georgia, serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.3;
}
.release-list p {
  font-size: 11.5px;
  line-height: 1.75;
  color: #6f6a5f;
}
.release-list em {
  font-family: "Plex Mono", ui-monospace, monospace;
  font-style: normal;
  font-size: 7px;
  letter-spacing: 0.12em;
  color: #6f6a5f;
  border: 1px solid rgba(18, 17, 15, 0.24);
  padding: 2px 5px;
  margin-top: 2px;
  white-space: nowrap;
}

.release-v3-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 2px;
  padding: 11px 12px;
  background: rgba(224, 67, 42, 0.055);
  border: 1px solid rgba(224, 67, 42, 0.22);
  border-left: 3px solid #e8472a;
  text-decoration: none;
  color: #12110f;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.release-v3-row i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e8472a;
}
.release-v3-row b {
  font-family: "Instrument Serif", "Noto Serif SC", Georgia, serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.release-v3-row em {
  margin-left: auto;
  font-family: "Plex Mono", ui-monospace, monospace;
  font-style: normal;
  font-size: 7px;
  letter-spacing: 0.1em;
  color: #e8472a;
  white-space: nowrap;
}
.release-v3-row:hover b { color: #e8472a; }

.release-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(18, 17, 15, 0.2);
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: #8a8273;
}
.release-foot a { color: #12110f; text-decoration: none; border-bottom: 1px solid rgba(18, 17, 15, 0.24); }
.release-foot a:hover { color: #e8472a; border-color: #e8472a; }

@media (max-width: 980px) {
  .release-tab { display: none; }
  .release-chip { display: inline-flex; }
  .release-panel { width: 100%; border-left: 0; }
  .release-body { padding: 22px 20px 16px; }
  .release-ver strong { font-size: 46px; }
  .release-body h2 { font-size: 27px; }
  .release-foot { padding: 13px 20px calc(13px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .release-tab, .release-panel, .release-backdrop { transition: none; }
}

html.release-open .fixed-ui,
html.release-open .site-head { opacity: 0.22; transition: opacity 0.3s ease; }
