:root,
:root[data-theme="day"] {
  color-scheme: light;
  --research-ink: #242424;
  --research-muted: #6b6b6b;
  --research-rule: rgba(36, 36, 36, 0.12);
  --research-accent: #b8941f;
  --research-brass: #c9a227;
  --research-brass-bright: #e6c200;
  --research-ink-on-brass: #0b0d14;
  --research-ring: rgba(201, 162, 39, 0.35);
  --research-page: #fff;
  --research-nav-bg: #fafafa;
  --research-nav-hover: rgba(36, 36, 36, 0.06);
  --research-nav-active: rgba(201, 162, 39, 0.14);
  --research-overlay: rgba(0, 0, 0, 0.32);
  --research-dialog: #fff;
  --research-chip-bg: #f2f2f2;
  --research-chip-ink: #3d3d3d;
  --research-error: #b42318;
  --research-error-bg: rgba(180, 35, 24, 0.08);
  --research-success: #067647;
  --research-serif: "Source Serif 4", Georgia, serif;
  --research-sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  --research-nav-width: 14.25rem;
  --research-nav-width-compact: 4.35rem;
}

:root[data-theme="night"] {
  color-scheme: dark;
  --research-ink: #f0f5ff;
  --research-muted: #a8b8cc;
  --research-rule: rgba(168, 194, 228, 0.22);
  --research-accent: #fff000;
  --research-brass: #fff000;
  --research-brass-bright: #fff8d6;
  --research-ink-on-brass: #0b0d14;
  --research-ring: rgba(255, 240, 0, 0.35);
  --research-page: #0b0d14;
  --research-nav-bg: #090b10;
  --research-nav-hover: rgba(168, 194, 228, 0.08);
  --research-nav-active: rgba(255, 240, 0, 0.12);
  --research-overlay: rgba(0, 0, 0, 0.55);
  --research-dialog: #12151f;
  --research-chip-bg: #1a2840;
  --research-chip-ink: #d8e2ee;
  --research-error: #ff8a80;
  --research-error-bg: rgba(255, 138, 128, 0.12);
  --research-success: #6ce9a6;
}

.research-app,
.research-app * {
  box-sizing: border-box;
}

.research-app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--research-page);
  color: var(--research-ink);
}

.research-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: var(--research-nav-width);
  min-width: var(--research-nav-width);
  padding: 1.35rem 1rem 1.15rem;
  background: var(--research-nav-bg);
  font-family: var(--research-sans);
  z-index: 20;
  overflow: hidden;
}

.research-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-bottom: 1.35rem;
  padding: 0 0.1rem;
  min-width: 0;
}

.research-nav-collapse {
  appearance: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--research-muted);
  cursor: pointer;
}

.research-nav-collapse:hover,
.research-nav-collapse:focus-visible {
  color: var(--research-ink);
  background: var(--research-nav-hover);
  outline: none;
}

.research-nav-collapse-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.research-nav-collapse-icon--max {
  display: none;
}

body.research-nav-compact .research-nav-collapse-icon--min {
  display: none;
}

body.research-nav-compact .research-nav-collapse-icon--max {
  display: block;
}

.research-nav-account-block {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.research-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--research-ink);
  text-decoration: none;
}

.research-nav-brand:hover {
  color: var(--research-ink);
}

.research-nav-logo-mark {
  display: block;
  width: 1.35rem;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 240, 0, 0.2));
}

.research-nav-logo-text {
  font-family: var(--research-serif);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.research-nav-logo-accent {
  font-style: italic;
  color: #c9a227;
}

:root[data-theme="night"] .research-nav-logo-accent {
  color: #fff000;
}

.research-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
  overflow: hidden;
}

.research-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.48rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--research-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.research-nav-icon {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.research-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-nav-link:hover {
  background: var(--research-nav-hover);
  color: var(--research-ink);
}

.research-nav-link.is-active {
  background: var(--research-nav-active);
  color: var(--research-ink);
  font-weight: 600;
}

.research-nav-link.research-nav-account {
  color: var(--research-ink);
  font-weight: 600;
}

.research-nav-link.research-nav-account:hover {
  color: var(--research-accent);
}

.research-nav-link:focus-visible,
.research-theme-toggle:focus-visible,
.research-login-close:focus-visible,
.research-login-btn:focus-visible,
.research-login-link:focus-visible,
.research-login-dismiss:focus-visible,
.research-login-field input:focus-visible,
.research-feed-more:focus-visible,
.research-cover-card:focus-visible,
.research-magazine-row:focus-visible {
  outline: 2px solid var(--research-accent);
  outline-offset: 2px;
}

.research-nav-link .research-nav-handle {
  font-size: 0.84rem;
  letter-spacing: -0.01em;
}

.research-nav-foot {
  margin-top: auto;
  padding-top: 0.65rem;
  flex-shrink: 0;
  display: grid;
  gap: 0.25rem;
}

.research-nav-user {
  margin: 0;
  font-size: 0.75rem;
  color: var(--research-muted);
  word-break: break-all;
}

.research-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--research-nav-width);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow: auto;
  transition: none;
}

/* Article reading: compact icon rail + flyout menus */
body.research-nav-compact .research-nav {
  width: var(--research-nav-width-compact);
  min-width: var(--research-nav-width-compact);
  padding: 1rem 0.5rem 0.85rem;
  align-items: center;
}

body.research-nav-compact .research-main {
  margin-left: var(--research-nav-width-compact);
}

body.research-nav-compact .research-nav-head {
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  padding: 0;
  width: 100%;
  align-items: center;
}

body.research-nav-compact .research-nav-brand {
  justify-content: center;
  padding: 0.15rem 0;
}

body.research-nav-compact .research-nav-logo-text {
  display: none;
}

body.research-nav-compact .research-nav-list {
  align-items: center;
  width: 100%;
}

body.research-nav-compact .research-nav-list > li {
  width: 100%;
  display: flex;
  justify-content: center;
}

body.research-nav-compact .research-nav-link,
body.research-nav-compact .research-theme-toggle {
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  gap: 0;
}

body.research-nav-compact .research-nav-label,
body.research-nav-compact .research-nav-user {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.research-nav-compact .research-nav-foot {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

body.research-nav-compact .research-nav-account-block {
  display: flex;
  justify-content: center;
}

body.research-nav-compact .research-nav-collapse {
  width: 2.65rem;
  height: 2.65rem;
}

body.research-nav-compact .smd-publish-index-launcher,
body.research-nav-compact.research-has-shell .smd-publish-index-launcher {
  left: var(--research-nav-width-compact);
}

body.research-nav-compact .smd-publish-index-panel,
body.research-nav-compact.research-has-shell .smd-publish-index-panel {
  left: var(--research-nav-width-compact);
  max-width: min(18rem, calc(100vw - var(--research-nav-width-compact) - 2.5rem));
}

body.research-nav-compact .smd-publish-index-backdrop,
body.research-nav-compact.research-has-shell .smd-publish-index-backdrop {
  left: var(--research-nav-width-compact);
}

.research-nav-flyout[hidden] {
  display: none !important;
}

.research-nav-flyout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--research-overlay);
}

.research-nav-flyout-panel {
  position: fixed;
  z-index: 41;
  width: min(17rem, calc(100vw - 5rem));
  padding: 1rem 1rem 0.85rem;
  border-radius: 12px;
  background: var(--research-dialog);
  border: 1px solid var(--research-rule);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  font-family: var(--research-sans);
}

.research-nav-flyout-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.research-nav-flyout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--research-accent);
  flex-shrink: 0;
}

.research-nav-flyout-icon .research-nav-icon,
.research-nav-flyout-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.research-nav-flyout-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--research-ink);
}

.research-nav-flyout-desc {
  margin: 0 0 0.85rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--research-muted);
}

.research-nav-flyout-desc[hidden] {
  display: none;
}

.research-nav-flyout-panel.has-body {
  width: min(22rem, calc(100vw - 5rem));
  max-height: min(70vh, 32rem);
  overflow: auto;
}

.research-nav-flyout-body {
  margin: 0.35rem 0 0.65rem;
}

.research-nav-flyout-body[hidden] {
  display: none !important;
}

.research-nav-flyout-status,
.research-nav-flyout-empty {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--research-muted);
}

.research-nav-flyout-section-label {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--research-muted);
}

.research-nav-flyout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.research-nav-flyout-item {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.research-nav-flyout-item--handle {
  grid-template-columns: 1fr;
  padding: 0.35rem 0.25rem;
}

.research-nav-flyout-item:hover,
.research-nav-flyout-item:focus-visible {
  background: var(--research-hover);
}

.research-nav-flyout-thumb {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 6px;
  overflow: hidden;
  background: var(--research-rule);
}

.research-nav-flyout-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.research-nav-flyout-item-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.research-nav-flyout-item-meta {
  font-size: 0.72rem;
  color: var(--research-muted);
}

.research-nav-flyout-item-copy strong {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

.research-nav-flyout-item-excerpt {
  font-size: 0.78rem;
  color: var(--research-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.research-library-feed {
  margin-top: 1rem;
}

.research-nav-flyout-item-badge{display:inline-block;margin-left:.45rem;padding:.12rem .45rem;border-radius:999px;background:var(--research-chip);font-size:.62rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--research-muted);vertical-align:middle}

.research-nav-flyout-actions[hidden] {
  display: none !important;
}

.research-nav-flyout-dismiss[hidden] {
  display: none !important;
}

.research-nav-flyout-actions {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.research-nav-flyout-btn {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--research-rule);
  border-radius: 8px;
  background: transparent;
  color: var(--research-ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.research-nav-flyout-btn:hover,
.research-nav-flyout-btn:focus-visible {
  background: var(--research-nav-hover);
}

.research-nav-flyout-btn.is-primary {
  border-color: transparent;
  background: var(--research-brass);
  color: var(--research-ink-on-brass);
}

.research-nav-flyout-btn.is-primary:hover,
.research-nav-flyout-btn.is-primary:focus-visible {
  background: var(--research-brass-bright);
}

.research-nav-flyout-dismiss {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--research-muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.research-nav-flyout-dismiss:hover {
  color: var(--research-ink);
}

.research-theme-toggle {
  appearance: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--research-muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.research-theme-toggle:hover {
  color: var(--research-ink);
  background: var(--research-nav-hover);
}

.research-theme-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

:root[data-theme="day"] .research-theme-icon--moon,
:root[data-theme="night"] .research-theme-icon--sun {
  display: none;
}

/* —— Magazine feed —— */

.research-magazine,
.research-feed {
  max-width: 58rem;
  margin: 0 auto;
  padding: 2.25rem 1.35rem 5rem;
  font-family: var(--research-serif);
  line-height: 1.55;
  font-size: 1.125rem;
}

.research-magazine--home {
  max-width: none;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.research-magazine--home .research-magazine-recent {
  max-width: 58rem;
  margin: 0 auto;
  padding: 0 1.35rem;
}

body.research-has-covers .research-magazine--home .research-magazine-recent {
  border-top: 1px solid var(--research-rule);
  margin-top: 0.25rem;
  padding-top: 0.15rem;
}

.research-magazine-featured[hidden] {
  display: none !important;
}

.research-magazine-covers {
  margin-bottom: 0;
}

.research-magazine-covers-scroll {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 1.35rem 1.35rem 1.5rem;
  scrollbar-width: thin;
}

.research-magazine--home .research-magazine-covers-scroll {
  padding-left: max(1.35rem, calc((100vw - 58rem) / 2 + 1.35rem));
  padding-right: max(1.35rem, calc((100vw - 58rem) / 2 + 1.35rem));
}

.research-cover-scroll-card {
  flex: 0 0 min(68vw, 15.5rem);
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--research-chip-bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.research-cover-scroll-card:hover,
.research-cover-scroll-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.research-cover-scroll-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-cover-card {
  position: relative;
  display: block;
  min-height: 9rem;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #1a1a1a;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.research-cover-card:hover,
.research-cover-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.research-cover-card.is-hero {
  min-height: clamp(18rem, 48vh, 34rem);
  width: 100%;
  border-radius: 0;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
}

.research-magazine--profile .research-cover-card.is-hero {
  border-radius: 12px;
}

.research-cover-card.is-scroll {
  flex: 0 0 min(44vw, 22rem);
  min-height: 14rem;
  scroll-snap-align: start;
}

.research-cover-card-image {
  position: absolute;
  inset: 0;
}

.research-cover-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-cover-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.research-cover-card-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1rem 1.05rem 1.05rem;
}

.research-cover-card.is-hero .research-cover-card-caption {
  padding: 1.35rem 1.5rem 1.5rem;
}

.research-cover-by {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--research-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 248, 214, 0.88);
}

.research-cover-card h2 {
  margin: 0;
  font-family: var(--research-serif);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.research-cover-card.is-hero h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
}

.research-cover-card.is-scroll h2 {
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.research-cover-date {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--research-sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

.research-magazine-label {
  margin: 0 0 1rem;
  font-family: var(--research-sans);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--research-muted);
}

.research-magazine-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.research-magazine-row {
  display: block;
  padding: 1.35rem 0;
  border-top: 1px solid var(--research-rule);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

.research-magazine-list > li:first-child .research-magazine-row {
  border-top: 0;
  padding-top: 1rem;
}

.research-magazine-item {
  position: relative;
}

.research-magazine-item .research-magazine-row {
  padding-right: 6.5rem;
}

.research-unpublish-btn {
  position: absolute;
  top: 1rem;
  right: 0;
  z-index: 2;
  margin: 0;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: #c45c5c;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.research-unpublish-btn:hover,
.research-unpublish-btn:focus-visible {
  color: #9b2c2c;
  outline: none;
  text-decoration: underline;
}

.research-magazine-row-top {
  display: none;
}

.research-magazine-row-meta {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--research-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--research-muted);
  line-height: 1.35;
}

.research-magazine-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.research-magazine-row.has-thumb .research-magazine-row-main {
  grid-template-columns: minmax(0, 1fr) 5.25rem;
  gap: 1rem;
}

.research-magazine-row-copy {
  min-width: 0;
}

.research-magazine-row:hover h3,
.research-magazine-row:focus-visible h3 {
  color: var(--research-accent);
}

.research-magazine-row-thumb {
  display: block;
  width: 5.25rem;
  height: 3.5rem;
  border-radius: 6px;
  overflow: hidden;
  background: var(--research-chip-bg);
  flex-shrink: 0;
  grid-row: 1;
  grid-column: 2;
  align-self: start;
}

.research-magazine-row:not(.has-thumb) .research-magazine-row-thumb {
  display: none;
}

.research-magazine-row-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-magazine-row-meta.is-empty {
  display: none;
}

.research-magazine-row-sep {
  color: color-mix(in srgb, var(--research-muted) 70%, transparent);
}

.research-magazine-row-meta time {
  font-weight: 400;
}

.research-magazine-row h3 {
  margin: 0;
  padding-right: 0;
  font-family: var(--research-serif);
  font-size: 1.22rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: pretty;
}

.research-magazine-row-excerpt {
  margin: 0.35rem 0 0;
  font-family: var(--research-sans);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--research-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.research-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 0 1.15rem;
  font-family: var(--research-sans);
}

.research-type-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border: 1px solid var(--research-rule);
  border-radius: 999px;
  color: var(--research-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.research-type-chip.is-active {
  color: var(--research-ink);
  border-color: var(--research-brass);
  background: var(--research-nav-active);
}

.research-magazine-row-kind {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--research-muted);
}

.research-magazine-row-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.research-magazine-row-cat {
  font-family: var(--research-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--research-muted);
}

.research-magazine--profile .research-profile {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--research-rule);
}

.research-magazine--profile .research-profile-handle {
  font-family: var(--research-serif);
  font-weight: 600;
}

.research-feed-head {
  margin-bottom: 2rem;
}

.research-feed-head h1 {
  margin: 0 0 0.5rem;
  font-family: var(--research-serif);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.research-feed-lead {
  margin: 0;
  font-family: var(--research-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--research-muted);
  max-width: 38rem;
}

.research-feed-status {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--research-rule);
  font-family: var(--research-sans);
  font-size: 0.9rem;
  color: var(--research-muted);
}

.research-feed-status[hidden] {
  display: none !important;
}

.research-feed-status.is-loading {
  border-style: dashed;
}

.research-feed-status.is-empty,
.research-feed-status.is-error {
  text-align: center;
  padding: 2rem 1.25rem;
}

.research-feed-status.is-error {
  color: var(--research-error);
  border-color: color-mix(in srgb, var(--research-error) 35%, var(--research-rule));
  background: var(--research-error-bg);
}

.research-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.research-feed-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.35rem 0;
  border-top: 1px solid var(--research-rule);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

.research-feed-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.research-feed-card:hover h2,
.research-feed-card:focus-visible h2 {
  color: var(--research-accent);
}

.research-feed-card-body {
  min-width: 0;
}

.research-feed-meta {
  margin: 0 0 0.4rem;
  font-family: var(--research-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--research-muted);
}

.research-feed-card h2 {
  margin: 0;
  font-family: var(--research-serif);
  font-size: 1.28rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.research-feed-when {
  margin: 0.4rem 0 0;
  font-family: var(--research-sans);
  font-size: 0.82rem;
  color: var(--research-muted);
}

.research-feed-excerpt {
  margin: 0.65rem 0 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--research-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.research-feed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.65rem 0 0;
}

.research-feed-tag {
  font-family: var(--research-sans);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--research-chip-bg);
  color: var(--research-chip-ink);
}

.research-feed-cover {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--research-chip-bg);
}

.research-feed-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-feed-more-wrap {
  margin: 2rem 0 0;
  text-align: center;
}

.research-feed-more-wrap[hidden] {
  display: none !important;
}

.research-feed-more {
  appearance: none;
  border: 1px solid var(--research-rule);
  border-radius: 999px;
  background: transparent;
  color: var(--research-ink);
  font-family: var(--research-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  cursor: pointer;
  min-width: 9rem;
}

.research-feed-more:hover:not(:disabled) {
  border-color: var(--research-accent);
  color: var(--research-accent);
}

.research-feed-more:disabled {
  opacity: 0.5;
  cursor: default;
}

/* —— Profile feed (author home) —— */

.research-profile {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  margin: 0 0 1.75rem;
}

.research-profile-avatar {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--research-chip-bg);
}

.research-profile-avatar[hidden] {
  display: none;
}

.research-profile-handle {
  margin: 0;
  font-family: var(--research-sans);
  font-size: clamp(1.55rem, 3.6vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.research-profile-bio {
  margin: 0.55rem 0 0;
  font-family: var(--research-sans);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--research-muted);
  max-width: 36rem;
}

.research-profile-bio[hidden] {
  display: none;
}

.research-profile-section {
  margin: 0 0 0.85rem;
  font-family: var(--research-sans);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--research-muted);
}

.research-profile-count {
  margin: 0.35rem 0 1.25rem;
  font-family: var(--research-sans);
  font-size: 0.86rem;
  color: var(--research-muted);
}

.research-feed-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  font-family: var(--research-sans);
}

.research-feed-cat {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--research-muted);
}

.research-library {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.35rem 5rem;
  font-family: "Source Serif 4", Georgia, serif;
}

.research-library h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
}

.research-library-lead {
  margin: 0 0 2rem;
  font-family: var(--research-sans);
  font-size: 0.95rem;
  color: var(--research-muted);
  line-height: 1.5;
}

.research-empty {
  margin: 0;
  padding: 2rem 0;
  font-family: var(--research-sans);
  color: var(--research-muted);
}

.research-login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--research-overlay);
  backdrop-filter: blur(4px);
}

.research-login-backdrop[hidden],
.research-login-dialog[hidden] {
  display: none !important;
}

body.research-login-open {
  overflow: hidden;
}

.research-login-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 41;
  transform: translate(-50%, -50%);
  width: min(24rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  border-radius: 16px;
  border: 1px solid var(--research-rule);
  background: var(--research-dialog);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  font-family: var(--research-sans);
  overflow: hidden;
}

.research-login-dialog:not([hidden]) {
  animation: research-login-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes research-login-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.research-login-sheet {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 1.5rem);
  min-height: 0;
}

.research-login-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1.2rem 1.2rem 0.95rem;
  border-bottom: 1px solid var(--research-rule);
}

.research-login-header-main {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.research-login-mark {
  width: 1.15rem;
  height: auto;
  flex-shrink: 0;
  margin-top: 0.12rem;
  filter: drop-shadow(0 0 5px rgba(255, 240, 0, 0.18));
}

.research-login-header h2 {
  margin: 0 0 0.2rem;
  font-family: var(--research-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.research-login-lead {
  margin: 0;
  font-size: 0.84rem;
  color: var(--research-muted);
  line-height: 1.45;
}

.research-login-close {
  appearance: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: -0.15rem -0.15rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--research-muted);
  cursor: pointer;
}

.research-login-close svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.research-login-close:hover {
  color: var(--research-ink);
  background: var(--research-nav-hover);
}

.research-login-progress {
  flex-shrink: 0;
  padding: 0.85rem 1.2rem 0.25rem;
}

.research-login-progress-track {
  height: 2px;
  border-radius: 999px;
  background: var(--research-rule);
  overflow: hidden;
}

.research-login-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9a227, #fff000);
  transform-origin: left center;
  transform: scaleX(0.38);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.research-login-progress-fill[data-step="otp"] {
  transform: scaleX(1);
}

.research-login-progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.research-login-step {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--research-muted);
}

.research-login-step.is-active {
  color: var(--research-ink);
}

.research-login-step.is-done {
  color: var(--research-success);
}

.research-login-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.95rem 1.2rem 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.research-login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.research-login-field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--research-muted);
}

.research-login-field input {
  width: 100%;
  min-width: 0;
  padding: 0.62rem 0.8rem;
  border: 1px solid var(--research-rule);
  border-radius: 10px;
  background: color-mix(in srgb, var(--research-page) 88%, var(--research-muted));
  color: var(--research-ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

:root[data-theme="night"] .research-login-field input {
  background: color-mix(in srgb, var(--research-page) 92%, #fff);
}

.research-login-field input:focus {
  outline: none;
  border-color: var(--research-accent);
  box-shadow: 0 0 0 3px var(--research-ring);
  background: var(--research-page);
}

.research-login-field input::placeholder {
  color: color-mix(in srgb, var(--research-muted) 80%, transparent);
}

.research-login-otp input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.28em;
  text-align: center;
  font-size: 1.1rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.research-login-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 1.2rem 1.15rem;
  border-top: 1px solid var(--research-rule);
  background: color-mix(in srgb, var(--research-dialog) 94%, var(--research-muted));
}

.research-login-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.85rem;
  min-height: 0;
}

.research-login-links:empty {
  display: none;
}

.research-login-link {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--research-accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.research-login-link:hover {
  text-decoration: underline;
}

.research-login-link[hidden] {
  display: none;
}

.research-login-btn {
  appearance: none;
  border: 1px solid var(--research-rule);
  border-radius: 10px;
  background: transparent;
  color: var(--research-ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.62rem 1rem;
  cursor: pointer;
  min-height: 2.65rem;
}

.research-login-btn.is-block {
  width: 100%;
}

.research-login-btn.is-solid {
  border-color: var(--research-brass-bright);
  background: var(--research-brass-bright);
  color: var(--research-ink-on-brass);
  box-shadow: 0 0 20px rgba(255, 240, 0, 0.18);
}

:root[data-theme="day"] .research-login-btn.is-solid {
  background: linear-gradient(180deg, #fff000 0%, #e6c200 100%);
  border-color: #d4ad00;
  color: var(--research-ink-on-brass);
}

.research-login-btn.is-solid:hover:not(:disabled) {
  filter: brightness(1.03);
  box-shadow: 0 0 24px rgba(255, 240, 0, 0.28);
}

.research-login-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.research-login-btn[aria-busy="true"] {
  position: relative;
  color: transparent;
}

.research-login-btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--research-ink-on-brass);
  border-right-color: transparent;
  border-radius: 50%;
  animation: research-spin 0.65s linear infinite;
}

.research-login-dismiss {
  appearance: none;
  margin: 0;
  padding: 0.15rem 0;
  border: 0;
  background: none;
  color: var(--research-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

.research-login-dismiss:hover {
  color: var(--research-ink);
}

@keyframes research-spin {
  to { transform: rotate(360deg); }
}

.research-login-hint {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--research-ink);
  background: var(--research-nav-hover);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.research-login-hint[hidden] {
  display: none;
}

.research-login-error {
  margin: 0 0 0.75rem;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--research-error);
  background: var(--research-error-bg);
  border: 1px solid color-mix(in srgb, var(--research-error) 25%, var(--research-rule));
  overflow-wrap: anywhere;
  word-break: break-word;
}

.research-login-error[hidden] {
  display: none;
}

body.research-has-shell .smd-publish-top {
  display: none;
}

/* Article reader inside the shared research shell */
body.research-has-shell {
  --page: var(--research-page);
  --ink: var(--research-ink);
  --muted: var(--research-muted);
  --rule: var(--research-rule);
  --accent: var(--research-accent);
  --ring: var(--research-ring);
  --lead: var(--research-ink);
  --quote: var(--research-muted);
  --code-bg: var(--research-chip-bg);
  --chip-bg: var(--research-chip-bg);
  --chip-ink: var(--research-chip-ink);
}

body.research-has-shell .smd-publish-title {
  margin: 0 0 0.65rem;
}

body.research-has-shell .smd-publish-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  margin: 0 0 0.65rem;
}

body.research-has-shell .smd-publish-like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  margin-left: auto;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--research-rule);
  border-radius: 999px;
  background: transparent;
  color: var(--research-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

body.research-has-shell .smd-publish-like-btn:hover,
body.research-has-shell .smd-publish-like-btn:focus-visible {
  color: var(--research-accent);
  border-color: var(--research-accent);
  outline: none;
}

body.research-has-shell .smd-publish-like-btn.is-liked {
  color: #e25555;
  border-color: rgba(226, 85, 85, 0.45);
  background: rgba(226, 85, 85, 0.08);
}

body.research-has-shell .smd-publish-unpublish-btn {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: #c45c5c;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

body.research-has-shell .smd-publish-unpublish-btn:hover,
body.research-has-shell .smd-publish-unpublish-btn:focus-visible {
  color: #9b2c2c;
  outline: none;
  text-decoration: underline;
}

body.research-has-shell .smd-publish-like-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

body.research-has-shell .smd-publish-handle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  margin: 0 0 0.5rem;
}

body.research-has-shell .smd-publish-follow-btn {
  margin-left: auto;
  padding: 0.38rem 0.85rem;
  border: 1px solid var(--research-rule);
  border-radius: 999px;
  background: transparent;
  color: var(--research-ink);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.research-has-shell .smd-publish-follow-btn:hover,
body.research-has-shell .smd-publish-follow-btn:focus-visible {
  border-color: var(--research-accent);
  color: var(--research-accent);
  outline: none;
}

body.research-has-shell .smd-publish-follow-btn.is-following {
  background: var(--research-chip-bg);
  border-color: transparent;
  color: var(--research-muted);
}

body.research-has-shell .smd-publish-platform-disclaimer {
  margin: 2.5rem 0 0;
  padding-top: 1.35rem;
  border-top: 1px solid var(--research-rule);
  font-family: var(--research-sans);
}

body.research-has-shell .smd-publish-disclaimer-launcher {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--research-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

body.research-has-shell .smd-publish-disclaimer-launcher:hover,
body.research-has-shell .smd-publish-disclaimer-launcher:focus-visible {
  color: var(--research-accent);
  outline: none;
}

.smd-platform-disclaimer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--research-overlay, rgba(12, 16, 24, 0.52));
}

.smd-platform-disclaimer-backdrop[hidden] {
  display: none !important;
}

.smd-platform-disclaimer-dialog {
  position: fixed;
  inset: 0;
  z-index: 61;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
}

.smd-platform-disclaimer-dialog[hidden] {
  display: none !important;
}

.smd-platform-disclaimer-dialog:not([hidden]) {
  pointer-events: auto;
}

.smd-platform-disclaimer-panel {
  width: min(40rem, 100%);
  max-height: min(82vh, 44rem);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--research-rule);
  background: var(--research-dialog);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.22);
  font-family: var(--research-sans);
}

.smd-platform-disclaimer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.65rem;
  border-bottom: 1px solid var(--research-rule);
  position: sticky;
  top: 0;
  background: var(--research-dialog);
  z-index: 1;
}

.smd-platform-disclaimer-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.smd-platform-disclaimer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--research-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.smd-platform-disclaimer-close:hover,
.smd-platform-disclaimer-close:focus-visible {
  background: var(--research-hover);
  color: var(--research-ink);
  outline: none;
}

.smd-platform-disclaimer-body {
  padding: 1rem 1.1rem 1.25rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--research-muted);
}

.smd-platform-disclaimer-section {
  margin: 0 0 1.15rem;
}

.smd-platform-disclaimer-section:last-child {
  margin-bottom: 0;
}

.smd-platform-disclaimer-section h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--research-ink);
}

.smd-platform-disclaimer-section p {
  margin: 0 0 0.55rem;
}

.smd-platform-disclaimer-section p:last-child {
  margin-bottom: 0;
}

body.smd-platform-disclaimer-open {
  overflow: hidden;
}

body.research-has-shell .research-main .smd-publish-shell {
  max-width: 70ch;
  margin: 0 auto;
  padding: 2.5rem 1.35rem 5rem;
}

body.research-has-shell .research-main .smd-publish-hero-stage {
  padding: 0 1.35rem 1.25rem;
  background: transparent;
  width: 100%;
  max-width: none;
}

body.research-has-shell .smd-publish-cover--hero {
  width: 100%;
  max-width: 58rem;
  margin: 0 auto;
}

body.research-has-shell .smd-publish-cover--hero img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

body.research-has-shell .smd-publish-index-launcher {
  left: var(--research-nav-width);
}

body.research-has-shell .smd-publish-index-panel {
  left: var(--research-nav-width);
  max-width: min(18rem, calc(100vw - var(--research-nav-width) - 2.5rem));
}

body.research-has-shell .smd-publish-index-backdrop {
  left: var(--research-nav-width);
}

@media (max-width: 820px) {
  .research-app {
    flex-direction: column;
  }

  .research-magazine,
  .research-feed {
    padding: 1.75rem 1rem 4rem;
  }

  .research-magazine--home .research-magazine-recent {
    padding: 0 1rem;
  }

  body.research-has-covers .research-magazine--home .research-magazine-recent {
    margin-top: 0.15rem;
  }

  .research-magazine-covers-scroll {
    padding: 1.15rem 1rem 1.25rem;
  }

  .research-cover-scroll-card {
    flex-basis: min(74vw, 14rem);
  }

  .research-magazine-row.has-thumb .research-magazine-row-main {
    grid-template-columns: minmax(0, 1fr) 4.75rem;
    gap: 0.85rem;
  }

  .research-magazine-row-thumb {
    width: 4.75rem;
    height: 3.15rem;
  }

  .research-feed-card {
    grid-template-columns: 1fr;
  }

  .research-feed-cover {
    width: 100%;
    height: 10rem;
    order: -1;
  }

  .research-nav {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.85rem 1rem 0.75rem;
  }

  .research-main {
    margin-left: 0;
    min-height: 0;
  }

  .research-nav-head {
    margin-bottom: 0.85rem;
    width: 100%;
  }

  .research-nav-brand {
    margin: 0;
    padding: 0;
    width: auto;
  }

  .research-nav-list {
    flex: 1 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.2rem;
  }

  .research-nav-foot {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .research-nav-link {
    padding: 0.42rem 0.65rem;
    font-size: 0.84rem;
  }

  body.research-nav-compact .research-nav {
    width: 100%;
    min-width: 0;
    padding: 0.85rem 1rem 0.75rem;
    align-items: stretch;
  }

  body.research-nav-compact .research-main {
    margin-left: 0;
  }

  body.research-nav-compact .research-nav-logo-text,
  body.research-nav-compact .research-nav-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  body.research-nav-compact .research-nav-link,
  body.research-nav-compact .research-theme-toggle {
    width: auto;
    height: auto;
    padding: 0.42rem 0.65rem;
    gap: 0.65rem;
  }

  .research-nav-flyout-panel {
    left: 1rem !important;
    right: 1rem;
    width: auto;
    max-width: 20rem;
    margin: 0 auto;
    top: auto !important;
    bottom: 1.25rem;
  }

  body.research-has-shell .smd-publish-index-launcher {
    left: 0;
    top: auto;
    bottom: 1rem;
    transform: none;
    border-radius: 0 8px 8px 0;
  }

  body.research-has-shell .smd-publish-index-panel,
  body.research-has-shell .smd-publish-index-backdrop {
    left: 0;
  }
}

/* Nested WebView iframes often fail to paint position:fixed. Keep the rail in flow. */
html.is-fire-embed,
html.is-fire-embed body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

html.is-fire-embed .research-app {
  height: 100%;
  min-height: 100%;
  flex-direction: row;
}

html.is-fire-embed .research-nav {
  position: relative;
  top: auto;
  left: auto;
  bottom: auto;
  flex: 0 0 var(--research-nav-width);
  width: var(--research-nav-width);
  min-width: var(--research-nav-width);
  height: auto;
  align-self: stretch;
  overflow: auto;
}

html.is-fire-embed .research-main {
  margin-left: 0;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

html.is-fire-embed body.research-nav-compact .research-nav {
  flex-basis: var(--research-nav-width-compact);
  width: var(--research-nav-width-compact);
  min-width: var(--research-nav-width-compact);
}

html.is-fire-embed body.research-nav-compact .research-main {
  margin-left: 0;
}


.smd-unpublish-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--research-overlay, rgba(12, 16, 24, 0.52));
}

.smd-unpublish-dialog {
  position: fixed;
  z-index: 71;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(26rem, calc(100vw - 2rem));
}

.smd-unpublish-sheet {
  padding: 1.25rem 1.2rem 1.1rem;
  border: 1px solid var(--research-rule);
  border-radius: 14px;
  background: var(--research-page);
  color: var(--research-ink);
  font-family: var(--research-sans);
  box-shadow: 0 18px 48px rgba(12, 16, 24, 0.22);
}

.smd-unpublish-sheet h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.smd-unpublish-lead {
  margin: 0 0 1rem;
  color: var(--research-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.smd-unpublish-error {
  margin: 0 0 0.85rem;
  color: #b42318;
  font-size: 0.82rem;
}

.smd-unpublish-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}

.smd-unpublish-cancel,
.smd-unpublish-confirm {
  appearance: none;
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.smd-unpublish-cancel {
  border: 1px solid var(--research-rule);
  background: transparent;
  color: var(--research-ink);
}

.smd-unpublish-confirm {
  border: 0;
  background: #9b2c2c;
  color: #fff;
}

html.is-fire-embed .research-main {
  padding-bottom: 4.75rem;
}

.research-fire-nav {
  display: none;
}

html.is-fire-embed .research-fire-nav {
  display: flex;
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 90;
  transform: translateX(-50%);
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.28rem;
  border: 0;
  background: transparent;
  pointer-events: none;
}

html.is-fire-embed .research-fire-fab {
  pointer-events: auto;
  appearance: none;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--research-rule);
  border-radius: 999px;
  background: var(--research-page);
  color: var(--research-ink);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(12, 16, 24, 0.18);
}

html.is-fire-embed .research-fire-fab:hover,
html.is-fire-embed .research-fire-fab:focus-visible {
  color: var(--research-ink);
  background: var(--research-nav-hover);
  outline: none;
}

html.is-fire-embed .research-fire-fab svg {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}
